Reputation
154,932
Next tag badge:
768/1000 score
208/200 answers
Badges
23 238 422
Newest
 Good Answer
Impact
~8.4m people reached

Mar
11
revised Find all folders starting with number range
added 479 characters in body
Mar
11
answered Find all folders starting with number range
Mar
11
revised How can I remove just the writable files in a directory, without any prompt?
added 6 characters in body
Mar
11
comment How can I remove just the writable files in a directory, without any prompt?
With -type f, you're only removing regular files, not the other types of file. If you want to exclude directories, it should be ! -type d, not -type f.
Mar
11
comment How can I remove just the writable files in a directory, without any prompt?
That would fail to remove symlinks that point to files you don't have write access to.
Mar
11
answered How can I remove just the writable files in a directory, without any prompt?
Mar
11
revised Find all folders starting with number range
you need to exclude the 5001, 500123... ones
Mar
11
comment Find all folders starting with number range
What's the format of the number? Can there be 0502foo, 5000bar, 0x200123, 899.99xxx, 5e2-qwe... directories?
Mar
10
awarded  Nice Answer
Mar
10
revised Deduplicating Bash Brace Expansions
added 51 characters in body
Mar
10
revised Deduplicating Bash Brace Expansions
added 11 characters in body
Mar
10
answered Deduplicating Bash Brace Expansions
Mar
10
answered Using /dev/random, /dev/urandom to generate random data
Mar
10
answered shell scripts when exceeding 100 seconds to send an email
Mar
10
revised Remove any occurrence of '-' from a field in shell script
deleted 440 characters in body
Mar
10
comment Remove any occurrence of '-' from a field in shell script
@siddharthajain, -v is to pass a variable definition, here of the Output Field Separator special variable. -F , is short for -v FS=,. Check the awk man page for details.
Mar
10
comment Dynamic ~/.ssh/config
If you use zsh instead of bash, you can use the =(...) form of process substitution that uses temp files instead of pipes and /dev/fd: ssh -F =(echo "Host *"; echo " User dummy") ssh.example.com
Mar
10
comment Command to display first few and last few lines of a file
@FCTW, sudo sh -c '{ head; tail;} < /path/to/file'
Mar
10
comment vim: Force specific syntax via command-line argument
Shorter variant: vim '+set syn=sql' -
Mar
10
revised vim: Force specific syntax via command-line argument
formatting, use ' for compatibility with rc/es shells. `:` not necessary.