|
Unix is the operating system used by PRIMUS. If you have
an interactive shell account with PRIMUS, you will be most
productive if you learn some Unix commands to manage your
files and run programs.
Here is an excerpt from the Big
Dummy's Guide to the Internet that explains some basic
Unix commands. (Copyright © 1993, 1994 EFF):
If you connect to the Net through a Unix system, eventually
you'll have to come to terms with Unix. For better or worse,
most Unix systems do NOT shield you from their inner workings--if
you want to copy a Usenet posting to a file, for example,
you'll have to use some Unix commands if you ever want to
do anything with that file.
Like MS-DOS, Unix is an operating system--it tells the computer
how to do things. Now while Unix may have a reputation as
being even more complex than MS-DOS, in most cases, a few
basic--and simple--commands should be all you'll ever need.
If your own computer uses MS-DOS or PC-DOS, the basic concepts
will seem very familiar--but watch out for the cd command,
which works differently enough from the similarly named DOS
command that it will drive you crazy. Also, unlike MS-DOS,
Unix is case sensitive--if you type commands or directory
names in the wrong case, you'll get an error message.
If you're used to working on a Mac, you'll have to remember
that Unix stores files in "directories" rather than
"folders." Unix directories are organized like branches
on a tree. At the bottom is the "root" directory,
with sub-directories branching off that (and sub-directories
in turn can have sub-directories). The Mac equivalent of a
Unix sub-directory is a folder within another folder.
Seven Unix Commands You Can't Live Without
cat
Equivalent to the MS-DOS "type" command. To pause
a file every screen, type cat file | more, better: more file,
where "file" is the name of the file you want to
see. Hitting control-C will stop the display. You can also
use cat for writing or uploading text files to your name or
home directory (similar to the MS-DOS 'copy con:' command).
If you type cat > test you start a file called "test".
You can either write something simple (no editing once you've
finished a line and you have to hit return at the end of each
line) or upload something into that file using your communications
software's ASCII protocol). To close the file, hit Control-D.
cd
The "change directory" command. To change from your
present directory to another, type cd directory and hit enter.
Unlike MS-DOS, which uses a \ to denote sub-directories (for
example: stuff\text), Unix uses a / (for example: stuff/text).
So to change from your present directory to the stuff/text
sub-directory, you would type cd stuff/text and then hit
enter. As in MS-DOS, you do not need the first backslash if
the subdirectory comes off the directory you're already in.
To move back up a directory tree, you would type cd ../ followed
by enter. Note the space between the cd and the two periods--this
is where MS-DOS users will really go nuts.
cp
Copies a file. The syntax is cp file1 file2, which would copy
file1 to file2 (or overwrite file2 with file1).
ls
This command, when followed by enter, tells you what's in
the directory, similar to the DOS dir command, except in alphabetical
order.
ls | more
will stop the listing every 24 lines--handy if there are a
lot of things in the directory. The basic ls command does
not list "hidden" files, such as the '.login' file
that controls how your system interacts with Unix. To see
these files, type ls -a or ls -a | more ls -l will tell you
the size of each file in bytes and tell you when each was
created or modified.
mv
Similar to the MS-DOS rename command. In fact, mv file1 file2
will rename file1 as file2, The command can also be used to
move files between directories.
mv file1 News would move file1 to your News directory.
rm
Deletes a file. Type rm filename and hit enter (but beware:
when you hit enter, it's gone for good).
Back to Shell/UNIX Support |