18,035 reputation
13664
bio website
location United States
age
visits member for 2 years, 8 months
seen 15 hours ago

Debian user, GNU/Linux enthusiast, FLOSS supporter, hobby developer.


21h
comment top: how to cancel current command?
Blank input seems to work for me (press Enter without typing anything). ^D works for me too so I don't kno why it doesn't for you.
1d
comment Seemingly Inconsistent Behavior for “ln” & “ln -s”
@trysis The way you "see" it is non-standard usage and you are just going to confuse everyone else by insisting on using the words that way. In Unix-land, links are hard by default, and non-hard links are called symbolic. This is reflected in the naming of the system calls link(2) and symlink(2).
2d
comment How to display “human-readable” file sizes in find results?
The man page is simply advocating some unnecessary caution. It won't hurt, but I am not aware of any shell that requires {} to be quoted.
Apr
11
comment How to display “human-readable” file sizes in find results?
The -a option to ls is unnecessary since the arguments are expected to be files and not directories. GNU find uses ls -dils for the -ls option, so to replicate that most closely it would be ls -dilsh.
Apr
11
comment How to display “human-readable” file sizes in find results?
It is in fact completely unnecessary to quote the {} here. The single quotes in the command are for the shell but the shell is never going to see the ls -lah <args...> command at all - it sees {}, which does not need to be quoted. It is find that sees the ls -lah {} and it is find that expands the {}, and as implied by the name of the -exec option, find uses an exec* system call on the arguments directly, so there will not be any issues with spaces because find isn't going to do word-splitting on your filenames.
Apr
11
comment Alias or Intercept complex bash command with args
The real question is why? Why bother typing ls -l if you want ls -a?
Mar
26
comment Why do ls and hexdump disagree about my file size?
Were you not happy with hexdump -C?
Mar
26
comment Why do ls and hexdump disagree about my file size?
Also it looks like hexdump -x outputs the 2-byte pairs little-endian.
Feb
20
comment Is monitoring rsync with a pts device possible?
How is what you propose different from running rsync in a screen / tmux / dtach session?
Feb
13
awarded  Nice Answer
Feb
12
awarded  Nice Answer
Feb
11
comment Pressing tab after sourcing script file prints script related output
The same thing could be said for set as well, which is also a POSIX built-in.
Feb
7
reviewed Approve suggested edit on Why 'echo $0' gives different result for two different terminals?
Jan
14
reviewed Approve suggested edit on How to get LIRC Remote working with Fedora 19
Jan
7
comment How do I delete the first n lines of an ascii file using shell commands?
@Svetlana sed -i specifically. Most implementations just delete the file and replace it with a new one, which doesn't work for links since you end up leaving the original at its other location.
Dec
13
comment using regex with find
-name arguments are interpreted as shell glob patterns, not a regex. You need -regex if your find supports it: check your manpage. That's a really odd set of find parameters, by the way. You could accomplish the same with bash's -extglob feature, as in /var/log/!(btmp|lastlog|wtmp) (still a glob, not a regex).
Dec
13
answered Bash if script is called from terminal echo stdout to terminal, if from cron do not echo output
Dec
11
awarded  Enlightened
Dec
11
awarded  Nice Answer
Dec
11
comment Passing options to subcommands in bash
Option parsing is a very FAQ. The wooledge link from @jordanm is a great resource. See also this related question.