dana%. This is the prompt or the
command line. To interact with the computer, you will enter commands
at the command line. (If you are familiar with DOS, there are many
similarities.)
ls (for ``list''?). Try it and you will see the files and
folders (a.k.a. directories) in your home directory. If you have
been storing files on your Z drive, you will probably notice that they are
contained on dana in a folder called PC. Your Z drive is, in fact,
the PC folder in your home directory on your dana account. Any files that
you create in the PC folder in your dana account, will be visible
from your Z drive as well.
Most unix commands can be modified by giving additional options and
arguments. For example try, ls -l to list your files again but with
more details (``l'' for ``long'' listing?). List all your files/directories
that start with the letter ``A'' using wildcards. Try,
ls A*. To find all the files ending in ``m'', type ls *m. The
character ``*'' is a wildcard that stands for any number of
arbitrary characters.
stty erase at the command prompt, then inserting a space and
pressing the Backspace key (which probably makes a ^H appear), and
then hitting return. Now when you use the Backspace key, it should do
what you expect.
mkdir
command.
cd command, like this:
cd dirname where dirname is the name of the new
directory.
touch
filename. Use ls to verify that the new file was created.
cp file1
file2. Again, use ls to make sure it worked.
mv oldname newname. Then
use ls again.
rm.
cd ... (cd with no arguments will always take you back to
your home directory from anywhere in your directory tree.)
pwd
(print working directory).
logout or exit to logout when your are finished.
| Command examples | Description |
ls |
list files in the current directory |
ls -l |
``long'' list files in current directory |
ls -a |
list all files, including ``hidden'' files |
ls -alt |
list all files in chronological order |
mv oldname newname |
rename a file called oldname to newname |
mv filename dirname |
move a file called filename inside the directory called dirname |
cd dirname |
change to the directory called dirname |
cd dirname1/dirame2/ |
move to the directory dirname2 inside of the dirname1 directory |
cd .. |
Move up one directory in the directory tree |
cd |
Move back to your home directory |
cd ~/dirname1 |
Change to the directory dirname1 starting at your home directory. |
~ is a shortcut for you home
directory. To see the ``full path'' |
|
of your home directory, type cd
and then pwd. |
|
pwd |
show the current directory (print working directory) |
rm filename |
delete the file named filename |
rm * |
remove (delete) all the files in the current directory |
mkdir newdir |
make a new directory named newdir |
rmdir dirname |
delete a directory named dirname |
logout or exit |
logout of the current shell |