atlas 4 % cd courses
would change your current directory to the courses
subdirectory of where you are now. And
atlas 5 % cd /usr/users/abc/pascal
would change your current directory to /usr/users/abc/pascal.
atlas 6 % cd
After you typed that, your new current directory would be your
home directory.Another special directory abbreviation is .. which stands for the parent of your current directory. For example, if your current directory was /usr/users/abc/pascal and you typed
atlas 7 % cd ..
your new current directory would be /usr/users/abc.
atlas 8 % ls
You can also type
atlas 9 % ls -l
to get more detailed information such as file length, time of
last modification, and so on.To actually see the contents of a file, use the cat command or the more command. For example,
atlas 10 % cat a.tex
prints the file a.tex from your current directory on your
screen. If instead you type
atlas 11 % more a.tex
then you get the file printed on your screen again, but at the end of
each page the computer types something like
--More--(21%)and politely waits for you to hit the space bar before printing the next page. The more program has many other features; read the manuals.
atlas 12 % cp a.tex a.tex.old
To rename a file, use the mv command.
Thus,
atlas 13 % mv a.tex.old b.tex
would rename a.tex.old to b.tex. Any previously
existing b.tex would be wiped out. (However, if
oldfiles is the name of a subdirectory, then
mv a.tex.old oldfiles would move
a.tex.old into that subdirectory; no files would be deleted.
Similarly, mv a.tex.old .. would move
mv a.tex.old oldfiles into the parent of the
current directory.)To delete a file, use the rm command. For example,
atlas 14 % rm a.tex b1.tex letters/alice
deletes the files a.tex and b1.tex from the current
directory and the file alice from the letters
subdirectory of the current directory. The rm command (and
many other commands) accepts wildcards: for example, a *
stands for just about anything, so that
atlas 15 % rm a* b1.tex
would remove all files beginning with a, and
also b1.tex, from the current directory.
The rm command should only be used VERY CAREFULLY --
Unix does not have an "undelete" command; once a file is
gone, it is gone for good.
An unusual situation:
Sometimes you may accidentally create a file whose filename
is pathological -- e.g., a file whose name begins with a hyphen.
Such a file cannot be accessed by ordinary file commands, including
mv. To deal with it, you should rename it to a more conventional
filename by typing
where "name" is the old name of the file and "newname" is some new
filename which doesn't include a hyphen. The first hyphen tells
mv that anything following it should be interpreted as a filename,
not as a command switch.mv - name newname
atlas 16 % mkdir programs
creates a directory /usr/users/abc/programs. To delete a
subdirectory use rmdir:
atlas 17 % rmdir programs
removes the subdirectory programs of the current directory.
The subdirectory must be empty (no files or subdirectories of
its own) for this to work.
emacs bigpaper.tex". Instead
you can just type "emacs bi" and then press
the ESCAPE key. The Unix system will type in the rest of
the filename. If you have more than one file whose name
begins with "bi", then Unix will beep, to point out that
you need to type more letters.
ls"
will not show all of your
files. Some files have names beginning with a period;
those files are hidden and will not be revealed by the
"ls" command. You can see them with the
"ls -a" command.
Most of the hidden files can be manipulated like any other
file. For instance, if you type emacs .login
you can edit your ".login" file. However, most of the hidden files
are hidden for a good reason: If you alter them in the
wrong way, you can really mess things up thoroughly. The
".login" and ".cshrc" files are used during the login procedure;
if you mess them up, you may become unable to log in.
Thus, these files should not be altered by beginners, except
perhaps in ways that are carefully specified by more
advanced users.
Here is one alteration that I like; you might like it too: Somewhere in your ".login" or ".cshrc" file, add the line
alias cd 'chdir \!* && set prompt="`dirs`>"'
Then, at the end of your ".login" file, add this line:
cd
(Be sure to type these lines exactly!)
After you make these changes and log out and log in again,
your prompt will consist of your current directory (with
your home directory replaced by a tilde), followed by a
greater-than sign.By the way, the lines in your .login and .cshrc files that begin with a # (pound sign) are comment lines, ignored by Unix. If you mess up your .login and .cshrc files badly, you can copy the "plain" versions again from the directory /usr/skel. That is, log in and then give these commands:
cd
cp /usr/skel/.login .
cp /usr/skel/.cshrc .
Of course, if you mess the files up so badly that you can't
log in, then you'll need to ask one of the superusers for help. Don't
do that while they're out of town.
I'll describe the procedure first for Netscape. Run Netscape on your personal computer. Tell Netscape to go to this URL:
ftp://username@atlas.math.vanderbilt.edu/usr/users/username/
where both occurrences of "username" are replaced by your username.
That's right, this URL doesn't begin with the usual "http" -- it begins
with "ftp" instead. You'll be prompted for your password, and then
the browser will go to a display that is like a web page, but consists
of a list of all the files in your Atlas account's main directory.
(Then bookmark the URL -- it's hard to type, and you may want to
use it often!) Clicking on the name of a subdirectory will take you to that
subdirectory, etc.Microsoft Internet Explorer does not support password prompting, but you can follow a similar procedure if you include your password in your URL. Tell the browser to go to this URL:
ftp://username:password@atlas.math.vanderbilt.edu/usr/users/username/
where both occurrences of "username" are replaced by your username, and
"password" is replaced by your password. Caution:
Microsoft points out that this is not a secure means of logging in,
and recommends that a separate FTP program be used instead.
However, I don't think security is a big worry in our department --
we don't really have anything that hackers are likely to want to
steal or destroy -- so I think you're probably not running any
significant risks by using this login method for a few minutes.After you have an ftp directory showing, you can download or upload files as follows:
To download a file from Atlas to your personal computer, just shift-click on the filename -- i.e., hold down the shift key, and click on the filename. You'll be prompted with some basic questions: Where in your personal computer's directory structure do you want to copy the file? What filename do you want the file to have? etc.
To upload a file from your personal computer to your Atlas account, open up a directory listing of the files on your personal computer. Then use the mouse to "drag" the desired filename from the personal computer directory listing into the Netscape ftp listing. Netscape will ask you whether you want to upload the file.
Note: Although this technique may be easier than using a separate program for FTP, it is also slower, and it has the further disadvantage that for downloads you can only specify one file at a time. For large uploads or downloads, you may prefer to use the separate FTP program.
A VU Math web page, updated 5 Sept 99 by webmaster@math.vanderbilt.edu.