Seattle University Department of Computer Science tech U-001 UNIX\Linux CSSE Department Quick Reference to Unix Commands notes alias List the ALIASES in use lpr –P printer fi lename PRINT fi lename to printer alias name def Assign a name to a command defi nition lpq –P printer LIST PRINT JOBS in printer queue lprm –P printer job # REMOVE PRINT JOB job# from apropos keyword Locate commands by keyword lookup queue cal DISPLAY a CALENDAR for the current lpstat -v Display list of printer names month ls LIST contents of directory ls –al Produce a LONG LISTING OF ALL cat fi lename DISPLAY fi lename FILES cat fi lename1 fi lename2 > fi lename 3 ls directory LIST fi les in directory directory CONCATENATE (combine) fi lename1 and fi lename2 into fi lename 3 man command DISPLAYDISPLAY HELP for command cd CHANGE the current working DIRECTORY mkdir directory MAKE a DIRECTDIRECTORYORY named to login/home directory directory cd directory CHANGE current DIRECTDIRECTORYORY to directory cd .. CHANGE DIRECTORY to parent directory more fi lename View fi lename on the screen, one (..) page at a time. Press space bar for next page; RETURN for next line; q chmod modespecs fi lename to quit CHANGE protection MODE of fi les; modespecs: u=user; o=other, g=group; mv fi lename1 fi lename 2 -= delete; +=add; r=read; w=write; x= MOVE or rename fi lename1 to execute fi lename2 cmp fi lename1 fi lename2 passwd CHANGE YOUR PASSWORD COMPARE (binaries) fi lename1 and fi lename2 ps DISPLAY the status of your PROCESSES clear clears the screen pwd PRINT pathname of current directory cp fi lename1 fi lename 2 COPY fi lename 1 to fi lename 2 quota –v DISPLAY your DISK QUOTA and cp fi lename . COPY fi lename to current directory usage date SHOW current TIME and DATE rm fi lename REMOVE fi lename diff fi lename1fi lename2 rmdir directory REMOVE DIRECTORYDIRECTORY directory SHOW the DIFFERENCES between fi lename1 and fi lename2 script Makes fi le named typescript of a terminal session. EXIT stops du DISPLAY DISK USAGE (in kilobytes) scripting. emacs fi lename Invoke EMACS editor opening fi lename sort fi lename SORT fi lename in ASCII sequence fg foreground; restore suspended processes spell fi lename CHECK fi lename for SPELLING errors fi nger username Look up information about user username vi fi lename invoke vi editor opening fi lename grep keyword fi lename Search for occurrences of keyword in w LIST the users WHO are on the fi lename system currently and what they are doing gzip fi lename COMPRESS fi lename gunzip fi lename UNCOMPRESS fi lename wc fi lename Display a COUNT of WORDS, lines and characters for fi lename history SHOW HISTORY of entered commands who LIST WHO IS currently ON THE kill pid# TERMINA TERMINATETE or kill a PROCESS pid# SYSTEM whoami DISPLAY WHO YOU ARE logout Logout or EXIT from the system
For assistance with your account and connecting from home, contact the SU Helpdesk: [email protected], 206-296-5571