Ask HN: What are your top most useful Unix commands?
11–18 of 18 posts
Re: Ask HN: What are your top most useful Unix commands?
#12ls -l
the "alias" command in a file for setting up quick-commands
Re: Ask HN: What are your top most useful Unix commands?
#13Re: Ask HN: What are your top most useful Unix commands?
#14Re: Ask HN: What are your top most useful Unix commands?
#15grep, find, tail -f (useful to look at log files as they update) Extras: sort, uniq, sed, sftp, apropos, man
tail -F This will also follow a log file if it rotates.
I've used that to watch all logs apache and descendant processes could be writing to:
pstree -p $(pgrep -o apache2) \
| grep -Po '[^}]\(\K\d+'
| sed ':b;N;$!bb;s/\n/,/g' \
| sudo xargs lsof -d 0-1000 -a -p \
| grep -Po '\S+$' \
| grep 'log' \
| sort -u \
| xargs tail -FRe: Ask HN: What are your top most useful Unix commands?
#16But in truth, it's the bash scripting 'glue' that holds everything together.
Re: Ask HN: What are your top most useful Unix commands?
#17Re: Ask HN: What are your top most useful Unix commands?
#18kill lets you send any signal to a process you have control over. Corresponding signal handlers allow a wide range of behavior changes.
kill -USR1
where is the process ID (obtained from ps) for the dd command.
Instead of killing dd, it reports back how much has been read/copied so far. Especially useful for working with large files and you decide you want to guestimate how much longer the copy will take.