Frequently Used UNIX Tasks
Most commands listed after each task are detailed in the Common
UNIX Commands document, which may be accessed by clicking on the
listed command.
-
Working with files
-
List contents of a file: more or less,
cat, head,
tail
-
Delete (remove) a file: rm
-
Copy a file to your directory: cp
-
Rename a file or move a file to a new directory: mv
-
Look for text (e.g. a name) in one or many files: grep
-
Count the number of lines, words or characters in a file: wc
-
Prevent or allow access by others to your files or directories: chmod
-
Editing a text file
We have a lot of editors available for the creation and modification
of text files.
-
pico, a full-screen and easy to use editor (good for new users)
-
vi or vim,
powerful, available on every UNIX system but not super-easy to use
-
jed, a pretty powerful editor. It's nice to have colors!
-
Working with directories
-
List all the files and subdirectories in your current directory: ls
-
Move to your home directory:
cd
-
Find out which directory you are in (your current directory): pwd
-
Create a new directory: mkdir
-
Delete (remove) an existing directory: rmdir
-
Prevent or allow access by others to your files or directories: chmod
-
Logging In and Out
-
To log out of your current UNIX session: exit
-
To log into the cs.wbc.com or switch to another machine: rlogin,
telnet
-
Misc. ...
-
Change your password: passwd
-
Find or verify someone's electronic mail address: finger
-
To limit or change what finger can tell the world about you chfn
-
To find out your amount of available diskspace: du
-
Get detailed information about a UNIX command: man
-
Talk to other users: talk
-
To find a little humor in all this: fortune