Basic UNIX Commands note: in the following description, filename means the name of any file, cmd means any UNIX command, and arg means a generic argument. command flags meaning _______________________________________________________________________________ passwd change password exit leave UNIX (log out) logout same as exit man cmd give the UNIX manual page for cmd, if it exists apropos arg list all UNIX commands that deal with arg control-z suspend current application and escape to UNIX fg restore application from UNIX (if you can't log out because you have stopped jobs, you have suspended an application and not restored it.) control-c kill current application doesn't work for all applications (like vi) useful for ending infinite loops ls list files (like dir in DOS) -a show hidden files -l long listing of files (shows owner, size, last modification, etc.) ls filename list the file with name filename ls dirname list the contents of directory dirname cp filename1 filename2 copy file with name filename1 to filename2, overwriting filename2 if it already exists mv filename1 filename2 change the name of filename1 to filename2 overwriting filename2 if it already exists rm filename delete file with name filename (don't delete it unless you never need it again!) -i interactive mode (prompt before deleting) -f force mode (no prompt) cat filename show the contents of filename more filename show the contents of filename one page at a time cd dirname change directory to directory dirname cd change directory to your home directory cd ~ same as cd cd .. change directory to parent directory mkdir dirname create directory dirname rmdir dirname delete directory dirname (only works if dirname contains no files or directories) pwd show current working directory mv dirname1 dirname2 if dirname2 does not exist, change the name of dirname1 to dirname2 if dirname2 does exist and does not contain a file or subdirectory called dirname1, make dirname1 a subdirectory of dirname2 otherwise, return an error message mv filename dirname move filename into directory dirname, overwriting any file called filename already in dirname