Useful Unix commands

mkdir dataMake a new directory (a.k.a. folder) data
cd dataGo to directory data
lsList the contents of the current directory
ls dataList the contents of directory data
ls -lList more details
cd ..Go one level up
pwdShow current directory
cp file1 file2Copy file1 to file2
rm file1Remove file1
mv file1 file2Rename file1 to file2
mv file1 dataMove file1 to data (data is a directory)
mv file1 data/file2Move file1 to data and rename as file2
cat fileDump the contents of file to the screen.
less filePage the contents of a file (pressing q exits).

wc fileList the number of lines, words and characters in file
grep string fileList every line of file containing string
grep string file | wcCount the number of lines of file containing string. The "pipe" | makes the output of grep to become the input of wc.
find . -name '*.dat'List every *.dat file in this directory and the directories below. Useful for finding files lost in a large directory tree.