|
pwd  
ls  
cd file   which |
When you log on to a Unix computer, you are initially put into your home directory. Users' home directories are specified in the file /etc/passwd, which you can view (type the command more /etc/passwd).
Special symbols:
/   refers to the root directory
~   refers to your home directory
.   refers to your current working directory
..   refers to the parent directory -- the directory one level up
pwd  At any time, you can type the command pwd to see where on the tree you are currently sitting. (pwd = present working directory)
ls  To list the files located in your current directory, type ls. Useful variations on this command are
To list the files in a directory other than the one you are
currently sitting in, just add the directory name, e.g.,
ls /         (the root directory)
ls -l /usr/local
ls -al ..       (one directory higher)
ls -F bin       (in subdirectory named ``bin'')
cd 
To change directory, use the command cd, e.g.,
cd /usr/local
cd             go to your personal home directory
cd ..     move up one level
cd bin     descend one level into subdirectory ``bin'' (assuming it exists)
cd ../lib     move up one level and back down into subdirectory ``lib'' (assuming it exists)
file 
Every object represented on disk or in memory is a ``file'',
including text files, commands and programs, directories,
disks, printers, etc. When in doubt about the identity of
something you see with ls, just ask the computer
using the file command, e.g.,
file README
file /
file /usr/local/bin/netscape
file /bin/ls
which 
The commands you type usually correspond to actual files
somewhere on the directory tree. If you are curious, find
out where a command is located using the command which,
e.g.,
which vi
which netscape
which dir
which which