Simpler Introduction to UNIX - The Basics
R.B. Lammers, Feb 3, 2003
This introduction the basics of UNIX (navigation, file listing, and copying and moving files, etc). For details of more useful commands for processing data see the Simple Introduction to UNIX.
man get manual page on a UNIX command example: man uniq ls list directory contents example: ls -alR -a list all files (includes those beginning with '.' -l give extra details, long listing -R recursively descend through directories -t time sort listing cd change directory example: cd ../text_files using 'cd' without any path returns user to home directory pwd print name of current working directory example: pwd more view file on screen example: more +200 data1.txt +N start viewing at line number 'N' cp copy files and directories example: cp -p file1 file2 -p preserve file attributes (e.g. ownership and edit dates) -r copy recursively through directory structure -a archive, combines the flags -p -R and -d mv move files and directories example: mv -i file1 directory2/ -i interactive - prompts before overwriting files ln make links between files example: ln -s /home/user/Bigfile FileX -s make a symbolic link, establish a pointer to another file or directory. chmod change file permissions example: chmod a+r file*.gif a+r all + read: make file readable by all g+x group + executable: make file executable by all members of the group--