woensdag 3 oktober 2012

Bash cheatsheet

#tar the directory mydir (and its files/subdirectories) into a tar file named foo.tgz.
tar cvzf foo.tgz mydir 
#see a tar file s table of contents
tar tzf foo.tgz
#extract the contents of a tar file
tar xvzf foo.tgz
#find biggest dir
du -k | egrep -v "\./.+/"|sort -n