Command | Action | Example |
Creates a temporary name for a Unix command. | alias name command | |
| To remove an alias: | unalias name |
ansiprint | Prints a file to a printer connected to your computer. | ansiprint file |
assets | Displays your account resources, use, and threshold. | |
Places a suspended job in the background. | | |
Displays a specified file. | cat file | |
cd | Changes current directory to a different directory. | cd directory |
| To change back to your home directory: | cd |
| Directory abbreviations: ~ Home directory .. Parent directory . Current working directory | |
chmod | Changes permission status for a file or directory. | chmod code file chmod code directory |
| To keep a file private: | chmod 600 file |
| To give everyone read permission: | chmod 664 file |
compress | Reduces the size of a file and adds .Z to the file's name. | compress file |
| To restore a compressed file: | uncompress file.Z |
cp | Makes a copy of a file. | cp file1 file2 |
| To copy a file into a different directory: | cp file directory |
| To inquire before overwriting an existing file: | cp -i file1 file2 |
Compares two files and displays the differences. | | |
Restarts a suspended job in the foreground. | | |
finger | Displays user information at the specified computer. | finger userid@computer |
| To change your finger entry information: | chfn |
ftp | Starts the file transfer program with a remote computer. | ftp address |
Finds lines in a file matching a character pattern. | grep -icvn pattern file | |
| -i Ignores case -c Lists count of lines that contain pattern -v Lists all lines except those with pattern -n Lists line number for each found pattern | |
Displays the first ten lines of a file. | head file | |
| To display the first n number of lines: | head -n file |
help | Displays an online help note. | help note |
| To display a list of help notes: | help -l |
history | Displays a list of your most recent commands. | history |
| To repeat the nth command from the list: | ! n |
| To repeat your most recent command: | !! |
Displays active jobs and their corresponding job numbers. | jobs | |
| To start a job in the background: | job & |
| To return a job to the foreground by the job number: | fg %number |
| To send a running job to the background: | |
Terminates a process by its process identification number. | kill pid | |
| To use the strongest form of the kill command: | kill -9 pid |
Ends your computer session. | | |
ls | Lists the files and subdirectories in your current directory. | ls -Fltra |
| -l Lists long format -t Lists by modification time -r Lists in reverse order -F Lists file type with special character -a Lists all files including dot (.) files | |
lynx | Starts a text-only Web browser session at UW home page. | lynx |
| Starts a Web browser session at a specific Web address. | lynx url |
Displays Unix Manual entry for a command. | man command | |
| To search Manual Index for a keyword or topic: | man -k keyword |
mesg | Displays your talk and write message access status. | mesg |
| To set your message status to yes or no: | mesg y (or n) |
mkdir | Creates a new directory within your current directory. | mkdir directory |
more | Displays a file one screen at a time. | more file |
| Use | |
mv | Moves a file to a different directory. | mv file directory |
| Moves a directory to a second directory. | mv directory1 directory2 |
| To rename file1 as file2: | mv file1 file2 |
| To rename directory1 as directory2: | mv directory1 directory2 |
| To inquire before overwriting an existing file: | mv -i file1 file2 |
Starts program to change account password. | | |
pico | Starts the Pico text editor with a file. | pico file |
pine | Starts the Pine® electronic mail program. | |
prt | Sends a file to a Uniform Access printer. | prt -q printer file |
| To display a list of the available printers: | prt -printers | more |
ps | Displays processes and their corresponding process identification numbers. | |
pwd | Displays absolute pathname of current directory. | |
Permanently deletes a file. | rm file | |
| To verify prior to removal: | rm -i file |
rmdir | Deletes an empty directory. | rmdir directory |
| To verify prior to removal: | rmdir -i directory |
Checks the spelling in a file. | spell file | |
staffdir | Displays the Online UW Staff Directory. | staffdir "lastname, firstname" |
| To display all fields: | staffdir -full "lastname, firstname" |
telnet | Starts a telnet session with a remote computer. | telnet address |
Starts the vi text editor with a file. | vi file | |
Displays a list of who is on system. | | |
wc | Counts lines, words, and characters in a file. | wc file |
Special commands and characters:
Redirection
Wildcards used in filenames
Control codes
Redirection
| < | Routes input to command from file |
| > | Routes output from command to file |
| >> | Appends output to existing file |
| | | Routes output between commands |
| * | Matches any number of characters |
| ? | Matches one character |
| | Suspends the screen display |
| | Restarts suspended display |
| | Signals end of file |
| | Cancels a command |
| | Suspends a process or job: use fg to restart |
| | Clears the command line |
No comments:
Post a Comment