This page will help you in creating, updating, and changing directories and sub-directories within the shelltool of the UNIX directory structure.
University of Georgia
08 October 2002
The commands below will also help you move files from one folder to another.
UNIX computers can only be accessed with secure shell (ssh) software such as Putty or NiftyTelnet. When you are logged on to you UNIX account using Putty.exe or NiftyTelnet,
use the following commands followed by a <return> key. Click here to download Putty.exe.
Listing directory contents
Note: The asterisk (*) represents any character, text or number.
Changing, making, and removing directories (opening folders)
- ls lists all the files and sub-directories in the current directory.
- ls text* lists all files starting with text.
- dir (or ls -al)
tells more about these files and sub-directories such as permissions, owner, group, size, and date last modified.
Copying and backing files
- cd directoryname is used to move from your current directory to a subdirectory. When used alone, moves you to your home directory. Stands for change directory.
- cd .. (cd dot dot) changes from a sub-directory to the directory in which it resides. It moves you up a level. For example, if you were in home/web/dl/nh/tx, typing cd .. would move you to home/web/nh
- md newname or mkdir newname makes a sub-directory called newname in current directory.
- rd somename or rmdir somename removes (deletes) an empty sub-directory called somename.
Removing and deleting files
- cp existingfile newfile makes a copy of an existing file called existingfile to a new file called newfile.
- bak existingfile.html backs up existingfile.html to a sub-directory called OLD named with a date stamp, existingfile.html.yymmdd.
- rm filename removes a file called filename.
- rm filena* removes all files starting with filena.
- del filename deletes a file called filename.
- del filena* deletes all files starting with filena.
Reading and editing files
- mv oldname newname will move a file called oldname to one called newname.
- ren oldname newname will rename a file called oldname to one called newname.
- vi filename allows you to view and edit a text file called filename while in UNIX.
- :q! (colon q exclamation) stops vi without making changes.
- :wq (colon w q) saves and logs out.
- See vi Commands for all vi editing commands.
Other UNIX commands
- stty erase <key> sets erase key, where <key> is the erase/delete key for your keyboard.
- man command | more man presents online help for a command.
For example, man vi | more, tell you more about vi.
- <control> c (hold down <control> and c keys together) to quit something when things go wrong in order to stop a process and get back to the prompt.
- <control> d (hold down <control> and d keys together) to log out and end the session.