Basic Linux - UNIX Commands PDF
Basic Linux - UNIX Commands PDF
A P P E N D I X B
Basic Linux/UNIX
Commands
The tables in this appendix list some basic Linux/UNIX commands to get you up and run-
ning. There may be slight differences in syntax from distribution to distribution, and there
are many, many more commands. Check your user manuals, online resources, or simply
type man command at the prompt for more information on any command, where you
replace command with any Linux/UNIX command.
Commands Descriptions
399
Howlett_AppB.fm Page 400 Friday, June 25, 2004 1:39 PM
Commands Descriptions
cat file-name Shows the content of the file you specify on screen.
less file-name Opens the file to view in a read-only mode (Linux systems only).
Commands Descriptions
mv path/source-file path/ Moves a file from source-file to dest-file in the appropriate paths.
dest-file
rmdir –rf dir-name Removes the directory and all subdirectories and files under it.
Howlett_AppB.fm Page 401 Friday, June 25, 2004 1:39 PM
Commands Descriptions
date Shows system time and date. It is important to make sure this is the
correct time and date.
grep string Searches for a string when used with other commands. For exam-
ple, ls | grep Tony will list all files with Tony in their name in
the directory you issue the command in.
printenv Shows all the environment variables for the current user (terminal,
shell, text editor preferences, and so on).