Some Basic Unix Commands
For additional Unix help, attend some of the
CSUA help sessions and
check out their
introductory Unix tutorial.
For those of you familiar with DOS, the equivalent Unix commands are:
DOS command |
Unix command |
Description |
dir
|
ls
|
Displays a list of files in the current directory.
|
cd
|
pwd
|
Displays the current directory.
|
cd directory
|
cd directory
|
Changes the current directory to the specified one.
|
move source destination
|
mv source destination
|
Moves a file or directory.
|
ren oldname newname
|
mv oldname newname
|
Renames a file or directory.
|
copy source destination
|
cp source destination
|
Copies a file or directory.
|
md directory
|
mkdir directory
|
Makes a new directory.
|
rd directory
|
rmdir directory
|
Removes an empty directory.
|
del file
|
rm file
|
Removes a file.
|
deltree directory
|
rm -r directory
|
Removes a directory and all its subdirectories.
|
type file
|
cat file
|
Displays the contents of a text file.
|
type file | more
|
more file
|
Displays the contents of a text file, pausing at each screenful.
|
|
whatis command
|
Provides a brief description for the given command or program.
|
|
whereis program
|
Displays the location for the given program.
|
|
file file
|
Displays the type of the given file.
|
|
For more information on these or other commands and programs, use
man. For help with a specific command, type:
man command
If you don't know what the command is to do something particular, try:
man -k keyword
Last Modified: Tuesday, 30-Dec-2014 11:58:34 PST