Items Covered in this Edition:
Medium Cost Capacity SGIs with 3.25 inch floppy disk $1 1.2 MB iumsc2 1/4 inch cartridge tape $32 150 MB chemvgx 4 mm DAT tape $20 2 GBTo back up your data on a floppy drive, change directores to your home directory (type 'cd'), and insert the floppy disk into the drive in the Indigo box. All UNIX commands can be used to copy data to and from the /floppy directory, which is no different than the other UNIX directories.
For backups using a DAT or cartridge drive on
the host SGI, insert the
tape, then:
To create a new archive, type tar -cv filename(s)
To append to the archive, type tar -av filename(s)
To extract from the archive, type tar -xv filename(s)
For backups using a DAT or cartridge drive on
a remote SGI througgh the
network, insert the tape, then:
To create a new archive, type tar -cvBf remotename:/dev/tape filename(s)
To append to the archive, type tar -avBf remotename:/dev/tape filename(s)
to extract from the archive, type tar -xvBf remotename:/dev/tape filename(s)
Type man tar for more information. Note that the other popular backup utility, "Backup & Restore Utility" (also known as bru and used in the toolbox) does not allow files to be appended to the end of an existing archive. Appending and retrieving files can take a long time if there is a lot of data on the tape; while cartridge tapes cost more per megabyte (MB) than DAT tapes, they are more convenient when files must be routinely extracted that exist near the end of the tape.
As described in the March 1994 Scream-Saver newsletter, important files can be compressed, reducing the size of the file by abot 40%. PLEASE COMPRESS LARGE FILES WHEN ARCHIVING IS NOT APPROPRIATE. Also, save space on your tape or floppy by compressing your files or directories before archiving. Type compress filename to compress and rename your file filename.Z. Type uncompress filename.Z to uncompress this file. Directories can be compressed, and wildcard characters (* and ?) can be used. GNUzip does a better compression. Type gzip filename to compress and rename your file filename.gz; to uncompress, type gunzip filename.gz.
If you have further questions, please see Anurag Shankar in room 421C.
PID TTY TIME COMD 10420 ? 0:41 xterm 561 ? 4:56 4Dwd 566 ? 0:01 soundsch 24564 pts/4 3:27 xwsh 24565 pts/1 0:03 csh 567 ? 0:11 toolches 583 ? 0:03 xwsh 586 pts/0 0:01 csh 11503 ? 52:02 xclock 802 0:00The first column lists the PID or the process ID, an important number. The next one is the TTY or the teletype (a window in this case) from which the process was started (not all process have a TTY, which is ok). The next field, TIME, shows the cumulative execution time (in hours:minutes), and the final field show the COMD, the command or the program which is running.24165 ? 0:00 rsh 801 ? 0:00 rsh 877 ? 1:10 xcalenda 24166 0:00 4544 pts/1 4:45 xbiff 29559 pts/4 525:12 gr_osvie
If a program (or more correctly, a process) has hung, you can kill it by doing kill -9 PID_of_the_process. In other words, if I noticed that my xcalendar program was messed up, I'd do a kill -9 877 to kill it.
There is another kind of job control in Unix.
You can stop most programs
which are running in the foreground by doing
a control-Z. Let us consider
an example. Let's say you want to start the
program xcalendar. You type
xcalendar in a window and the xcalendar
window appears somewhere on the
screen. If you look at the original window
where you started xcalendar from,
you will see that you don't get the Unix
prompt back (since you asked that
particular window to run xcalendar in the
foreground). To get the prompt
back, you do a control-Z. This stops the
xcalendar program (stop here does
not mean kill). The xcalendar program is still
there, it is just stopped.
To look at all the stopped or running
programs, type jobs. You may see
something like this:
[1] + Suspended xcalendar
The number in the square braces is the job
number. You can bring the
job in the foreground again by typing fg %1,
where 1 is the job number.
You can also have the program run in the
background by doing a bg %1.
This will run xcalendar in the background and
you will always have access
to the Unix prompt. You can also kill a job
by doing a kill -9 %1.
This can be a very useful way to do several
things at once in the same
window (and this is really why Unix has
always been a multitasking
environment, even before it had X-windows).
You could also have started the program to run in the background in the first place by typing xcalendar &. Putting the & (ampersand) at the end of a program name runs it in the background. Of course, if you log out, all such programs which are running will be killed. To run a program such that it is not killed (these are say background fortran jobs which you want to run overnight, not x-window programs), you would start it with the nohup option. You say nohup a.out & to keep a.out running even when you have logged out.
All this can be confusing but once you understand the basic idea behind it, you can do things a lot more efficiently. For example, you don't have to start a new window while editing a file with the vi editor just because you wanted to do something else. You could stop it, do the other thing, then do a fg to get back into the editor exactly where you had left it.
The way the X-window system looks and feels on your particular machine is determined by which "window manager" the workstation vendor chooses to use. There are currently only two major choices - OpenLook and Motif. The Silicon Graphics machines use "4Dwm", an enhanced version of the Motif window manager (the original Motif window manager is normally "mwm"). (Sun workstations are the only ones these days which use the window manager "olwm" based on OpenLook.)
Some of you may wonder what practical uses this network transparency has. Well, for starters, you could log on to say a supercomputer in San Diego, and have it directly open a window on your workstation in front of you. It is like having one screen with ten windows open where each window is actually a different physical machine whose location then becomes irrelevant.
Next month we will talk about how you can use the X-window system to your advantage. If you want to learn more, you can read the "X Window System User's Guide" published by O'Reilly and Associates, a true gem of a book.
Problem: A disk located on chemvgx and
mounted on another SGI becomes
unmounted on the other SGI.
Solution: the
system administrator should
log in as root and type 'mount -av'
Problem: A SGI cannot connect to the
network (rlogin, telnet, ftp, ping,
etc., do not work).
Solution: The system
administrator should log in as
root and type 'route add default
129.79.136.174 1'. If the problem still
exists, type '/etc/reboot'.
Problem: Commands and processes which use
the network (including telnet,
ftp, mosaic, sybyl, and logging in) are
extremely slow.
Solution: Be patient.
Stop the command (control-c) or process and
try again.
NOTE THAT the next SGI Scream-Saver lunch will take place on June 2, 1994, at noon in room A400.