This is a draft cheat sheet. It is a work in progress and is not finished yet.
watch -n 5 'ntpq -p'
Issue the 'ntpq -p' command every 5 seconds and display output
egrep '(Tom|Dan) Savage' file
Print lines contain 'Tom Savage' or 'Dan Savage'
grep -irl 'keyword' *
Print all files name which contains keyword (case-insensitive, search from current folder recursively )
head -20 file | tail -10
Print lines 11 t0 20 of file
In vi, read lines 3 to 8 in foo.c and insert the lines to current file after current cursor line
ln -sv target/existing/directory new_link_to_create
Create a soft link file to existing folder