UP next_inactive CONTENTS

Carleton DeTar

Unix Command Reference





Default Terminal Keys


Rubout previous character <BackSpace>
Erase this line C-u
Stop console output C-s
Resume console output C-q




Listing File Names: ls


List file names (alphabetical order) ls
Show hidden files ls -a
Show permissions ls -l
List in chronological order ls -t



Displaying file contents


Print on console cat filename
Print on printer lpr filename
Print first $n$ lines head [-$n$] filename
Print last $n$ lines tail [-$n$] filename
Print one screenful at a time more filename
Next page within more <Space>
Previous page within more b
Searching within more /pattern
Print line(s) containing string grep string filename



Mail


Read your new mail mail
Read your old mail mail -f
Send from console to another user mail username
Send file to another user mail [-s subject] username < filename



File Maintenance


Copy a file cp currentfilename copyfilename
Delete a file rm filename
Rename a file mv oldname newname
Show differences between files diff leftfile rightfile
In which directory is your file? find . -name filename -print



Directories


Show the current directory pwd
Switch to a directory cd directoryname
Back up one level in the tree cd ..
Create a directory mkdir directoryname
Remove a directory rmdir directoryname
Moving a file to a directory mv filename directoryname (both must exist)
Moving a directory to new location mv directorynamenewparentdirectory
(both must exist)



Date and Calendar


Date and time of day date
Calendar cal [[mm] yyyy]



Users


Seeing who is logged in who or finger
Getting a username finger lastname
Changing identities su username
Seeing who you are whoami
who am i



Changing machines


Logging on to another machine rsh hostname
Logging out from any machine logout
Which machine is this? hostname



Information about a command


Man pages man command
Starting Infoexplorer info



Filename substitution


Wild cards ? *
Your home directory  
Home directory of another user  username





I/O redirection and pipes


Standard output >
Standard input <
Append to standard output »
Pipes/pipelines |




Sorting


Sort alphabetically on first word sort
Sort in numeric order sort -n
Sort in numeric order with scientific notation allowed sort -g
Sort on the $n$ th field sort -k$n$







tcsh command history


List previous commands history
Repeat previous command !!
Move up in history list Ctrl-p (previous)
Move down in history Ctrl-n (next)
Cursor left to edit command Ctrl-b (backwards)
Cursor right to edit command Ctrl-f (forwards)
Delete character in command Ctrl-d
Repeat $n$th command in history !$n$
Repeat command beginning with str !str




tcsh, csh job control


Run command in the background command &
Stop foreground job C-z
Run stopped job in foreground fg
Run stopped job in background bg
List background jobs jobs
Bring job foreward %[$n$]
Run command at lower priority nice command



tcsh miscellaneous


Filename, command name completion <Tab>
List possible completions Ctrl-d
Spelling correction ESC s
Define alias alias name 'definition'



csh environment


List current settings env
Change setting setenv VARIABLE value



Process control


List your processes ps
Tell a process to die kill PID
Kill without mercy kill -9 PID
Timing time command

References

For more complete information, refer to man pages for these commands and the info online documentation system. A good Unix reference is Brian W. Kernighan and Rob Pike, The Unix Programming Environment (Prentice-Hall, Englewood Cliffs, NJ, 1984).

About this document ...

This document was generated using the LaTeX2HTML translator Version 2002 (1.63) Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.

The translator was augmented by "uces.sty" and "uces.perl" (version 3.0b), which are available from the Hamlet Project at the University of Utah.


UP next_inactive CONTENTS