Reputation
933
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
9 16
Impact
~209k people reached

Jan
20
comment Adobe Reader for Linux discontinued
The latest version - Adobe Reader 9.5.5 is still available on the Adobe's servers through a direct link: ardownload.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/…
Nov
30
comment List all recently changed files (recursive)
Also it is more appropriate to use find ... -exec ls -l {} + which executes ls -l much more efficiently - fewer times with multiple parameters. This is a standard option of find specified by POSIX.
Nov
29
comment How to save brightness settings?
The directory with the brightness setting could have a different name. In my case (ThinkPad T540p, Ubuntu 14.04.3) it is: /sys/class/backlight/intel_backlight/.
Nov
23
comment How do I find out which repository a package comes from?
This is the correct answer! The commands in the answer by mac9416 need tedious interpretation + guessing based on their output. For more information about apt-cache policy see also superuser.com/a/236605/61370
Nov
12
comment What's the deal with the “.” and “..” in the directories?
@spectras: Thank you! I originally thought that but thomasrutter's answer was so convincing :) --- I have corrected my reply and I added demonstration that in ext4 . and .. are real directory entries stored in the file system.
Oct
26
comment What is the 'ptrace_scope' workaround for Wine programs and are there any risks?
Here is a description linked from a PlayOnLinux pop-up error message which aborts installation of .Net 4.5 unless the ptrace_scope is set to 0: playonlinux.com/en/…
Oct
26
comment What is the 'ptrace_scope' workaround for Wine programs and are there any risks?
I do not think that sudo setcap cap_sys_ptrace=eip ... is more secure because according to the description (man capabilities, capability.h) this capability allows the program to trace any process (like if it was running with root privileges) not just processes of the same user. Please correct me if I am wrong.
Oct
23
comment How can I use the grep command to extract line which is the next line of greping line?
+1 for POSIX-compliant solutions.
Oct
23
comment How can I use the grep command to extract line which is the next line of greping line?
Also please note that neither -P nor -A are options specified by POSIX (pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html) so they may not work on some Unix-like systems.
Oct
23
comment How can I use the grep command to extract line which is the next line of greping line?
The second filter (instead of grep -v) could be: tail -n+2 (from the second line to the end) or tail -n1 (last line). Which is 1. simpler, 2. without need to repeat the regex, 3. a little bit faster
Oct
22
comment Adding a number to a text file with a loop
I noticed just one considerable disadvantage: multiple values on a single line will result in multiple lines on the output. Try: echo 1 2 3 | xargs printf "%.2d\n". This can be somehow resolved using -d\\n otption to xargs.
Oct
22
comment Adding a number to a text file with a loop
I really like this solution. 1. It uses xargs which is often being forgotten. 2. It takes advantage of the possibility of printf to format multiple arguments using a single formatting expression. 3. printf allows it to accept multiple input formats of numbers like for example hexadecimal 0x1a. 4. printf tests the input to be a number and sensibly reports problems to stderr.
Oct
5
comment Grep: The asterisk(*) doesn't always work
The funny (and for troubleshooting pretty nasty :) thing is that your commands like grep This.*String file.txt will normally work because most probably there will not be a file matching the shell wildcard expression This.*String. In such a case by default Bash will pass the argument literally including *.
Oct
5
comment Grep: The asterisk(*) doesn't always work
@Serg: you have a high reputation here so I thought that you immediately notice what I mean. The OP has tagged the question bash so I assume the discussed commands are interpreted by bash. This means that first bash interprets its special characters and only after all performed expansions it passes the parameters to the spawned process. ----- For example this command in Bash: grep This.\*String file.txt will spawn /bin/grep with these parameters 0: grep, 1: This.*String, 2: file.txt. Notice that Bash removed the backslash and the originally escaped * was passed literally.
Oct
5
comment Grep: The asterisk(*) doesn't always work
In Bash (and most of the Unix shells) * is a special character and it should be quoted or escaped for example like this: grep 'This*String' file.txt or this: grep This\*String file.txt to not be surprised by unexpected results.
Sep
23
comment Is it possible to use nmcli completely without nm-applet?
OK, it seems that since Ubuntu 15.04 there is nmcli 0.9.10.0 which supports nmcli con add …. ...but this version of Ubuntu was not available at the time of writing your answer :)
Sep
23
comment Is it possible to use nmcli completely without nm-applet?
On which version of Ubuntu should this work? Ubuntu 14.04.3 has nmcli tool, version 0.9.8.8 which does not understand nmcli con add …: Usage: nmcli connection { COMMAND | help } COMMAND := { list | status | up | down | delete }.
Sep
16
comment Combine two commands into one command
You are doing it the other way round than the OP. I think that it is apparent that the OP wanted to run just a single instance of the source of the data - ps aux.
Sep
16
comment Extracting embedded images from a PDF
The -all switch (and the other new image format switches) was introduced in poppler version 0.25.0 (2013-12-11) - in Ubuntu it is since 14.10 (Utopic).
Jul
5
comment How to install Angrybirds in Ubuntu 14.10 with Wine?
Unfortunately both variants have been discontinued.