Useful Unix Commands You may find these useful. Nothing is guaranteed. Some may be absent, or function differently on some machines. Some of these commands can do several different things, depending on the options you select. For this sort of detail, you should use "man." For instance "man chmod" will tell you all the things that chmod can do, and how to ask for them. bc desk calcualtor cal prints calendar of desired month cat catenate and print cc compile C code cd change directory (Path; empty; branch; or ..) chmod change access rights of others clear clears the screen cp copy date gives today's date dbx debugger df disk usage of the system at large dirs directory stack du tells your directory structure; with -a gives all files echo returns its input; useful with | and in shells emacs general purpose editor and program manager; can edit binary ex open file for editing (primitive) ex - ex with no output (suitable for shell scripts) exit leave an internal shell or script f77 fortran compiler fg undoes control-Z ("foreground") file tells general type of a file (data, commands, troff, etc.) find locate a file [Hard to use because of impenetrable syntax.] finger like who, including full names of users from who is my mail from? grep pattern search head -N cat first N lines (default N) history what were my recent commands to the system? hostname tells name of host you are on jobs processes that you can access kill n stops process n; get n from ps last who logged in and when; also `last [user]' learn tutorial lessons lint C source inspection routine (I always found it useless) login allows you to log in again (new name, etc.) ln make a link (allows you to give more than one name to same file) lpr -Pxxxx use the xxxx printer ls list the current directory mail program for sending and receiving mail man look at manual entry more delivers output one screenful at a time mv rename nice limits your hogging of CPU time od octal dump passwd routine for changing your password popd delete one item from directory stack printenv states all the environment variables ps process status ps -g full process history pushd add entry to top of directory stack quota -v see how much disk is alloted to user rehash use after placing new executable files in bin/ renice change `nice' level (not clear whether available to all) rlogin remote login (followed by name of machine) rm remove rmdir remove a directory [must be empty] sort alphabetize the file (various options for determining the order) source cause the shell to take input from a file, e.g. from .cshrc spell check spelling in a file split divide a file into smaller files strings find ASCII embedded in a binary file style checks a file for common foibles tail -N cat last N line (default N) talk direct connection with another user tty what terminal am I on? u users currently on [long form: users] unalias disable some alias currently in force vi calls the visual editor view like vi but cannot write to the file w what people are doing wc word count for an ascii file who who's on the system who am i how am I logged in? .cshrc can hold aliases for commands .exerc can hold your preferred way of editing .mailrc can hold aliases for mailing .plan first line of this file is shown to any user who does finger .project first line of this file is shown to any user who does finger !! redo last command !$ last argument in previous command !:s/x/y redo previous command, substituting y in place of x !n redo command n !n:p [etc.] `print' command n. (Show it, but don't execute it.) !n:m mth argument to command n [commandword has m = 0] !n:s/x/y redo command n, substituting y in place of x !xyz... redo command beginning xyz... # first line of a cshell script; comment separator for same % shows current jobs (e.g. if you have something in background) @ tells how all variables are set by the shell & put at end of command you want done in background | pipeline * any sequence of letters ; separates commands in a sequence < > redirect >> append to end of indicated file ? any single character ^wrong^right substitute `right' letters for `wrong' letters in a command `...` puts output of ... into the command line; e.g. cat `ls`