Utilities
Boiled down:
special characters |
less |
more |
echo |
ls |
rm |
finger |
hostname |
cp |
mv |
grep |
head |
tail |
write |
sort |
uniq |
diff |
| (pipe) |
file |
date |
who |
script |
which |
whereis |
zcat |
gzip |
gunzip |
|
Special Characters
- *
- ?
- &
- |
- ;
- "
- '
- [ ]
- ( )
- $
- < >
- { }
- /
- \
- To use a special character precede it with a backslash \
Commands
- File Copy - cp source destination
- Move file - mv source destination
- Print file - lpr filename
- Search for a string - grep string file(s)
- First lines of a file - head -n file
- Last lines of a file - tail -n file
- Sort a file - sort file
- Find non-repeating lines of a file - uniq file
- Compare 2 files - diff file1 file2
produces a listing with editor commands
< indicates line is from 1st file
> indicates lines is from 2nd file
- Determine the type of file a file is - file file
- Display text to the output device - echo text
- Display value of variables - echo $var
- Show the date - date
- Record session - script
produces the file typescript consisting of everything displayed on the screen until exit
- compress file
- uncompress file.Z
- Tape archive - tar
- -cvf to create
- -xvf to extract
- Determine which command is used - which command
- Show where executable is - whereis command
- Find appropriate command - apropos comand
- who is on system - who
- short who - w
- Find information about a user -finger userid
- Determine who you are logged on as - whoami
- Send a message to a user - write user [terminal]
All work herein is subject to copyright. Original content to Dr. Deborah Whitfield, text content (Practical Guide to Linux) to Prentice Hall publishing.