world% command options filename
A simple unix command will contain only the command. In this document simple commands are prefixed by the phrase Command:. A detailed example of a command is prefixed by the phrase Example:.
The options, or flags, for unix commands are prefixed with a dash or hyphen. These options come directly after the command and before any filenames.
Example: sz -a my.file
Many unix commands require filename arguments. In this document filenames
are indicated by file1 or file2.
Whenever you see this in an example, you can replace it with the name of
the document you wish to create, access or view. Many commands can be
issued with more than one filename.
Also in this document optional values are indicated by
Every command should be followed by a carriage-return or enter. The command will not be invoked until you press this key.
Command: cat file1 >> file2
The special characters >> will append the contents of file1 to the end of file2
Command: cal month year
Example: cal 3 1993
March 93
S M Tu W Th F S
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
Example: cal 93
This will display the calendar for the entire year of 1993.
Command: cd directory
Use this command to change from the present directory to another directory.
Example: cd /pub
Example: cd /sources/macintosh/archivers
A / (slash) at the beginning of a pathname means "begin at the root directory". This is similar to beginning at the desktop on a Macintosh, or begining at C:\ on a PC.
Example: cd ..
The command cd followed by two periods will take you to the
directory one level above the directory you are currently in. For example,
if the path to your current directory is /sources/macintosh,
typing cd .. would change it to /sources.
Command: cd ~
Use this command to change the directory back to your home directory (the directory where your personal files are stored). The ~ (tilde) can always be used as a substitute for the path to your home directory.
Command: gzip file1
Example: gzip Shakespeare.complete
The Shakespeare.complete file will be compressed, renamed
Shakespeare.complete.gz, will take up less disk space and
will require less time to download. Files compressed with gzip
usually end with .Z, .z, or .gz
Command: cp file1 ile2
Example: cp roach-attack bugs
This will create a copy of the file roach-attack with the
new name bugs. Another useful example follows.
If you were in the directory /ftp/obi/Martin.Luther.King,
you could make a copy of a famous Martin Luther King speech to be placed
into your home directory with the command:
Example: cp free.at.last ~
The tilde "~" here refers to your home directory (see Changing to your Home Directory) and the filename will
remain unchanged. Once you issue this command, a copy of the document
free.at.last is added your home directory.
Command: pwd
Example: pwd
The pwd stands for "present working directory" and shows what
directory you are in. It indicates the exact path from the root. The
root is the top level of the unix file system, similar to the desktop
on a Macintosh, or C:\ on a PC.
Command: date
Use this command to get the date and time of day.
du
Command: gunzip file1.gz
Example: gunzip reading.txt.gz
The file reading.txt.gz then becomes reading.txt
without the suffix .gz. Compressed files usually
end with .Z, .z, or .gz.
You can read compressed ASCII text files on World without uncompressing
them. The special command gzcat will display the
compressed file.
Command: gzcat filename.gz
These compressed files can also be uncompressed on a Mac or PC after downloading. This can save time during the download, as the compressed file will be smaller. Your Mac or PC will need the Unix compress software. These programs can be found in the following directories on World:
PC utilities: /sources/pc/archivers/gzip
Mac utilities: /sources/mac/archivers/stuffit/expander
Command: du -k
Disk usage is the total amount of disk space your account is allocated on World. If your saved mail or other files are large, you may go over your quota and receive a warning message.
Command: pico file1
Example: pico memo.john
Pico will invoke the text editor used by Pine. This program has menus and uses arrow keys. If the file specified does not exist, pico will create a new one by that name. Pico is very user-friendly.
Vi, the text editor found on most UNIX systems, is also available.
Emacs (also on World) is a text editor of exceptional power and complexity. It features a built-in online tutorial and help system. A potent tool in the hands of an expert, it can do far more than edit text. To its devotees, Emacs is not simply an editor, but a way of life.
The commands needed to use emacs or vi effectively are rather complex, so we recommend user-friendly Pico.
Command: sz -a file1
If you are in the help directory and wish to download the World help file "Primer", just type:
Example: sz -a Primer
To do this from your home directory, type the command:
Example: sz -a /help/Primer
The sz tells World to send the file using the Zmodem file transfer
protocol. The -a indicates to send the file as a plain ASCII file.
Any file that is in a format other than plain text, such as a
Microsoft Word document or a shareware program, must be transferred
in binary mode.
The command sz is used to "download" a file from World to your
computer. To receive a file, you must tell your communications program to
"Receive Zmodem". Many telecom programs receive a Zmodem download
automatically.
To abort a file transfer, use the keystroke "control-x". You may need to hit "control-x" several times to interrupt the transfer.
Command: sz -b file1
Example: sz -b maccompress.sit
Example: sz -b kipling.Z
Example: sz -b shareware.application
The command sz tells World to send the file using the Zmodem
file transfer protocol. The -b means to send the file as a
binary transfer. Any file created from a word processsor or an application
(program), such as a piece of shareware, is binary and must be uploaded or
downloaded using binary mode. This is also true for any files that are
compressed.
The command sz is used to "download" a file from World to your
computer. To receive it, you must tell your communications program to
"Receive Zmodem". Many telecom programs receive a Zmodem download
automatically.
To abort a file transfer, use the keystroke "control-x". You may need to hit "control-x" several times to interrupt the transfer.
File Transfer (Send to World) Zmodem ASCII
Command:
The
Then, tell your communications prgam to start sending using the ZMODEM
protocol.
To abort a file transfer, issue the command "control-x". Several
"control-x" commands may be needed to interrupt the transfer.
Command:
Example:
The
Then, tell your communications program to start sending using the ZMODEM
protocol.
To abort a file transfer, issue the command "control-x". Several
"control-x" commands may be needed to interrupt the transfer.
Command:
When using Kermit, the World prompt becomes
If you are sending from World to your local host, type:
For example:
If you are sending from your local host to World, type:
For example:
To quit kermit, type:
Command:
Example:
This displays the size of the files. Directories will not show the
size of their contents. Use the command du for this.
Command:
Example:
A slash after a name indicates a directory. Other files will be
stored in the directory.
Another symbol you might see looks like this:
Example:
This indicates that
You may see another symbol
Command:
Use this command to display the files within the current directory.
It can be used selectively, as
Example:
This means display only those files whose names end with the numbers
Other options exist for listing files in special ways. To list the
files by date, use:
Example:
Command: ls -a
This command shows all files in a directory, both visible and invisible.
All files preceded by a period are normally invisible, and are not normally
displayed when using
Command:
Example:
Use this command to create a new directory.
Command:
Example:
Example:
This will give information (sometimes dry and verbose) about a given
command or software. Once one learns how to read them without getting
lost, they are quite useful.
Command:
Example:
WARNING:If the second name is another
file, this command will write the first file over the contents of the second
file, thus eliminating the second file. Be sure this is what you want to do
before using this command.
It is important to distinguish files from directories! Use the command "ls -F".
For example, if I type:
and these are both *files*, the file
Command:
The machine will prompt you:
Command:
Example:
Use this command to remove an empty directory. You must remove all
contents or the command won't work.
To remove EVERYTHING from a directory, type
Command:
Example:
Command:
Example:
Use this command to remove the named file. Any file you saved a few
minutes ago will be gone. Some older files may be found on the World
backups, but you must request a restore, which will take a least a day
for the staff to perform.
To be safe, it is best to assume deletion is FINAL.
Command:
Example:
Thus, the file called
To tell the difference between a file and a directory, use the command
Example:
Command:
The give the control-z command, chold down the control key,
and simultaneously press z.
UNIX allows you to conveniently suspend processes you are engaged in. While
reading mail, you may suddenly decide you want to read a file to obtain
information to include in the letter. To suspend composing in the
e-mail program called
There is a slight complication to suspending a Pine process: you have to
start Pine with the command
Command:
in order for that session of Pine to respond to the control-z
command. In UNIX, you can suspend several operations, and return to
them anytime, right where you left off. To see which jobs are
suspended, type:
Example:
Command:
If you have a job that you no longer want, you can get rid of it by
using the
Command:
Command: charges
Example:
Example:
This command will display your sessions and usage charges for the
current month.
This command will display your sessions and usage charges for July.
Command:
Example:
To view the contents of the specified file with pauses. Hit the
spacebar to see the next portion. To view previous screenfuls, use
Command:
Example:
This displays the contents of a file in a rapid scroll without
pausing. Use control-c to abort this.
Command:
This command displays a short list of all folks online at the moment
the command is issued.
rz -a
rz tells World to receive this file using the Zmodem file
transfer protocol. The -a means to transfer the file as a plain
ASCII file.
rz -b
rz -b
rz tells World to receive the file using the Zmodem file
transfer protocol. The -b indicates to send the file as a binary
file. If the file is not a simple ASCII file, binary mode should
be used. Any file created from a word processsor in non-ASCII
format, or an application (program) such as a piece of shareware, is
binary and must be uploaded or downloaded using binary mode. This is
also true for any files that are compressed.
kermit
C-Kermit> and UNIX
commands are no longer valid.
C-Kermit> send file1
Then, tell your communications program to start receiving.
world% kermit
C-Kermit> set file type binary
C-Kermit>
send CV082122.GIF
C-Kermit> receive file1
Then, tell your communications program to start sending.
world% kermit
C-Kermit> set file type binary
C-Kermit> receive funthings
exit at the C-Kermit> prompt.
ls -s
ls -s
1 activists.dir
2 chinese.food.brookline
12 emacs-command-summary
1 fun.internet.dir
27 Internet.books.list
1 key.letters.dir
1 mail
7 march.internet.hunt
ls -F
ls -F
In this example,
ACT_V.Macbeth
Cyberspace.discussion
News/
Alt.Internet.services
Mail/
Mail/ and News/ are directories.
The remaining items are files.
@
obi@
obi@ is a link, an alias which allows one file
or directory to have multiple placements. You can access these
aliases, just as if they were real, using the appropriate commands.
*. This indicates the file is a World
binary format and can only be used as a World command.
ls
ls *92
92. The * character allows you to save a great
deal of typing.
ls -cl
ls. These files are often called dot
files and are initialization files for the various programs. Some examples
might be:
.login .cshrc .newsrc .mailrc
mkdir name
mkdir tech.tips.collection
man command
man mail
man ls
mv file1 directory-name
mv file.moving.tips tech.tips.directory
mv my.speech speech.list
my.speech will overwrite
on top of the file speech.list If appending the contents of
the first file to the end of the contents in the second file is preferable
--not merely moving a file--use the command:
cat my.speech >> speech.list
passwd
Old password: (give your old password)
New password: (type in your new password)
Retype new password: (retype your new password to confirm it)
rmdir directory-name
rmdir old.files
rm directory-name/*
rm News/*
BE SURE YOU WANT TO DO THIS. You cannot undelete files on World.
rm file1
rm trash.this
mv file1 new-file1
mv file.moving.tips tech.tips
file.moving.tips will be renamed
tech.tips.
If the second name is an *existing* file, this command will
overwrite the first file over the contents of the second file,
thus eliminating the second file. Be sure this is what you want
to do! Look before you leap with the "ls" command.
If the second name is a directory (not a file), the file will be moved
into the directory. See "Move File Into Directory".
ls -F
control-z
mail, type the control-z command:
^Z
Suspended
pine -z
jobs
You can resume any job by typing a percent sign, followed by the
number shown in the job lising:
[1] Suspended rn wstd.general
[2] - Suspended pine -z
[3] + Suspended more Well.conference.list
%1
kill command. Simply specify the job number
on the command line.
kill %1
charges
charges 7
less file1
more big.file
b for "back." You can search for a specific word within
the text by typing the following command at the : prompt.
You must be in the : program to use the search command.
/search.pattern
cat file1
cat big.file
who
HOME Top of Help Desk Eye On The World The World Kiosk
This brings us to the end of this UNIX Command guide
brought to you by Vedder Wright (vwright@world.std.com)
and Will Donovan (70511.1317@compuserve.com) on behalf
of Software Tool and Die. This document may be redistributed
as long as the following notice remains intact.
This document was HTMLized and modified on January 5, 1995
Copyright by authors.
All rights reserved
Permanent license granted
(with deep appreciation and thanks) to
Software Tool & Die, Inc., 1330 Beacon St. Suite 215 Brookline, MA 02146