Getting Around the UNIX File System

I Want to... I Use... Popular Options...
List files and directories




Change to another directory

Remove a file

Remove a directory

Copy a file

Move a file

ls




cd

rm filename

rmdir directory_name

cp filename target

mv filename target

-l  Show a long listing
-a Show all files, including those that
     begin w/a period (hidden files)
-t  Show files by time last modified

directory_name Go to the named directory
.. Go up one directory


-f  Remove all files without prompting
-i  Remove Interactively
-r  copy a directory, all files, and subdirectories

-i  Copy, prompting when filename would overwrite target
-r  Copy a directory, all files, and subdirectories

-f  Move all files w/out prompting
-i  Move, prompting when filename would overwrite target

UNIX Equivalents for Popular DOS Commands

If you did this in DOS... Do this in UNIX...
ATTRIB =R [filename]
CD
CHKDSK
CLS
XCOPY [source target]
DATE
TIME
DEL [filename]
ERASE [filename]
DIR [filename]

DELTREE [directory]
FIND [text filename]
FORMAT

MKDIR [directory_name]
MORE

MOVE [filename]
MSBACKUP [options]

REN [filename target]
RENAME [filename target]
RMDIR [directory_name]
SORT [filename]

chmod a=r filename
cd
df
clear
cp -r filename target
date
date
rm filename
rm filename
ls

rm -r directory_name
grep text filename
format

mkdir directory_name
more filename

pg filename
mv filename target
cpio options
tar options

mv filename target
mv filename target
rmdir directory_name
sort filename

Working with Files

What I Want Do... What Command I Use...
Edit a text file

Print a text file

Print a Postscript file

Display a text file

Page through a text file


Compare two files

Sort the contents of a file

Count the letters, words, and lines in a file

Compress a file

Uncompress a file

Change who owns a file

vi filename

lp -dprinter filename

lp -dprinter Tpostscript filename

cat filename

pg filename
more filename

diff file 1 file 2

sort filename

wc filename

compress filename
pack filename
gzip filename

uncompress filename
unpack filename
gunzip

chown user filename

Connecting to Other Computers

What I Want To Do... What Command I Use...
Copy files to another computer

Run Commands on another computer

Login to another computer

Send E-mail

Read E-mail

rep from; file to:file
uuto source destination

rsh remote_computer "command options"

rlogin remote_computer
cu remote_computer

mailx user@computer
mailx user!computer

mailx

Getting On the Internet from UNIX

Command Description Where Do I Get It?
ftp

telnet

gopher

readnews (and
other UseNet Software)

mosaic

netscape

Used to browse Internet sites and copy
files to and from your computer.

Used to login to Internet sites.

Used to access documents from
Gopher Internet sites.

Used to read articles from UseNet
news groups.

Used for browsing the Internet via a
graphical interface.

Used for browsing the Internet via a
graphical interface.  Has more features
than Mosaic.

Comes w/most UNIX systems.

Comes with most UNIX systems.

Gopher can be obtained from this Internet site:
boombox.micro.umn.edu

Readnews can be obtained from this Internet
site: ftp.uu.net

Mosaic can be obtained from this site on the
Internet: ftp.ncsa.uiuc.edu

Netscape can be obtained from this site on the
Internet: ftp.netscape.com