Linux/Unix Stuff

display all files in or below current directory ..... find . -print
display all files in or below current directory with the word word in the filename ..... find . -print | grep word
remove file ..... rm filename
remove files recursively (in all directories in and below current) ..... rm -r filename(s)
remove files recursively with no prompt ..... rm -r -f filename(s)
look at disk usage in current directory and sort it ..... du -k -s * | sort -n
same as above, but exclude filenames having the word word in their titles ..... du -k -s * | sort -n | grep -v word
opposite of grep ..... grep -v word
tar a file ..... tar -cvf filename.tar file names to be tarred
untar a file ..... tar -xvf filename.tar
gzip a file ..... gzip file to be gzipped
undo gzip ..... gunzip filename.gz
write contents of file to screen ..... cat filename
write contents of file to screen at a page at a time ..... more filename (Pressing spacebar advances to next page.)
concatenate file2 to the end of file1 ..... cat file2 >> file1
copy a directory ..... cp -r -p dir1 dir2
view the first 10 lines of filename ..... head filename
view the last 10 lines of filename ..... tail filename

vim Stuff


go into paste mode with no indention ..... :set paste
go to beginning of line ..... 0
go to end of line ..... $
go to beginning of word ..... B
go to end of word ..... E
change an entire word ..... cw
search and replace all instances of word ..... :%s/search string/replacement string/g

svn Stuff


svn checkout svn+ssh://rubik/usr/amls/phase6_src

secure copy


scp jeremiah@kite:/home/jeremiah/phase6_src/amls_exe/fastfrs_Linux_x86_64 .