My Linux command quick reference

My day-to-day job does not involve Linux, so I made a command reference for me. Some useful nix commands:

list directory contents
ls
list directory contents wish permissions, dates, size, etc.
ls -l
print (name of) working directory
pwd
text editor
nano
copy file
cp
copy directory
cp -r
move or rename file or directory
mv
create directory
mkdir
delete file or directory
rm
delete non-empty directory
rm -r dir_nameorrm -ir dir_name [confirm everything]
process list
top
free space on all hdd
df -h
attributes
1. Owner
2. Group
3. World

permissions
0 --- no permissions
1 --x execute
2 -w- write
3 -wx write, execute (1+2)
4 r-- read
5 r-x read, execute (4+1)
6 rw- read, write (4+2)
7 rwx read, write, execute (4+2+1)

permission examples
chmod 700 some_file - you read, write, execute
chmod 777 some_file - everyone read, write, execute
chmod 744 some_file - you read, write, execute; everyone read
chmod 444 some_file - you read, everyone else

show (type) file in console
cat fileorcat file1 file2
if file is very long
cat file | moreorcat file | lessorless file
show last part of file
tail file
show first part of file
head file

Windows tracert
traceroute

Show the full path of (shell) command
which command

To locate the binary, source, and manual page files for a command
whereis command

To gzip output
cat somefile | gzip -9 > filename.gz

To archive directory to TAR
tar cf archive_name.tar directory/to/archive/

To archive directory to tar.gz
tar czf archive_name.tar.gz directory/to/archive/

To archive directory to tar.bz2
tar cjf archive_name.tar.bz2 directory/to/archive/