This useful little snippet can be used to find the unique list of extensions for all files in a directory and all its subdirectories. I can never remember the precise awk incantation for this:
1 % find . -type f | awk -F. '{print $NF}' | tr '[:upper:]' '[:lower:]' | sort -u
I recently received a bug report for my quick-and-dirty TCP debugging tool tcpconndbg where it was creating a large number of zombie processes. The person who filed the bug, Peter Viskup, was even kind enough to send a patch. While this is old news to anyone with extensive Unix programming experience, always remember the following:
If you create a child process using fork(), you must either:
Explicitly retrieve the child process’s exit code using one of the wait() functions (e.
Read more...