Reputation
115,903
Next tag badge:
97/100 score
36/20 answers
Badges
18 146 292
Newest
 Nice Answer
Impact
~4.4m people reached

Jun
4
comment timestamp, modification time, and created time of a file
[OT] @Benubird, yes it could be useful to others. My answer has other alternatives.
Jun
4
comment timestamp, modification time, and created time of a file
@Benubird. the access time would be updated upon ls. Probably you're on Linux and the filesystem has been mounted with relatime or noatime options. Try mounting with strictatime (but beware of the performance implications). (BTW, are you planning to undelete your fifo question or have you given up on it altogether? I had done a longish answer to it.)
Jun
4
revised Find files containing one string but not the other
edited body
Jun
4
revised Find files containing one string but not the other
added 83 characters in body
Jun
3
comment Make pwd result in terms of “~”?
@mr.spuratic it's only correct (except for the usage of echo) in zsh. In other shells, $HOME would be treated as a pattern and the whole thing subject to split+glob.
Jun
3
revised Make pwd result in terms of “~”?
added 278 characters in body
Jun
3
revised Security implications of running perl -ne '…' *
added 102 characters in body
Jun
3
revised Security implications of running perl -ne '…' *
added 506 characters in body
Jun
2
awarded  Guru
Jun
2
comment find files in current directory
@lcd047, that's the wrong format. For that file, you need file.txt to contain 'a b' or a\ b or a" "b... That's why I said provided it's in the right format. Note that blanks and newline are not the only characters to quote. The quoting characters themselves also need quoted.
Jun
2
comment find files in current directory
@lcd047, the OP didn't fully specify the exact format of file.txt. xargs rm -f -- < file.txt can handle file names with spaces or even newline (while xargs -d '\n' or your tr|-0 can't) provided file.txt is in the right format.
Jun
2
comment find files in current directory
@lcd047, the OP didn't fully specify the exact format of file.txt. xargs rm -f -- < file.txt can handle file names with spaces or even newline (while xargs -d '\n' or your tr|-0 can't) provided file.txt is in the right format.
Jun
2
comment list files in ascending order
ls -1trd /dir1/subdir1/*. Try man ls
Jun
2
comment find files in current directory
xargs rm -f -- < file.txt ?
Jun
2
revised $VAR vs ${VAR} and to quote or not to quote
note that it's not about blank, but about IFS characters.
Jun
1
comment How to find files with 100% NUL characters in their contents?
Fails on a file created with printf '\0\n\0\0\n\n' > file or printf '\n' > file for that matters.
Jun
1
revised Get specific number in line
added 226 characters in body
Jun
1
answered Get specific number in line
Jun
1
comment Testing if a file descriptor is valid
exec being a special builtin will exit the shell if it fails (for bash, only when in POSIX compliance mode). command exec prevents that. true is not a special builtin. Note that exec and command exec do affect the current environment (that's why I said if you want to redirect stdout to it).
Jun
1
revised Testing if a file descriptor is valid
added 489 characters in body