Bare bones UNIX help

This file contains documentation for a very small number of UNIX commands to get you started. More extensive documentation is found here.

Tables of Examples of Common UNIX Commands

Examples related to directories

cd change to your home directory
cd 496 change to a sub directory named 496 (if it is in your current directory)
cd ~/496 change to a sub directory named 496 which is in your home directory
cd ~/496/.Data change to a sub directory named .Data which is in 496 which is in your home directory
cd .. change to the parent directory of your current directory
ls list the contents of the current directory
ls -a list all of the contents of the current directory (including invisible files and directories)
ls -F list the contents of the current directory (with a / after the name of a directory)
mkdir 496 make a directory called 496

Examples related to files

cp oldname newname copy the file oldname to newname in the same directory
copy the file oldname to newname in a different directory as with mv below
emacs filename use the editor emacs to edit the file filename in the current directory (it is created if it does not exist)
more filename display the contents of filename on the screen
mv oldname newname move the file oldname to newname (this just renames the file)
mv oldname ../ move the file oldname to its parent directory (keeping the same name)
mv oldname ../newname move the file oldname to its parent directory and rename it newname
mv oldname ../newname move the file oldname to its parent directory and rename it newname
mv oldname ~/newname move the file oldname to your home directory and rename it newname
touch .Audit create an empty file named .Audit in the current directory

Miscellaneous Examples

The command alias changes the meaning of a command you type (usually to include some option). To make aliases automatically, add them to your .cshrc file in your home directory. Several UNIX command aliases are in this file. You can edit it and add your own aliases.
alias ls 'ls -F' use the option -F everytime you use the command ls
source .cshrc do this immediately after changing the file .cshrc to incorporate the changes


Last modified: March 10, 1997

Bret Larget, larget@mathcs.duq.edu