Here's this month's account of the triumphs, trials and tribulations that I caused myself or encountered since the last time, and a couple tips that may come in handy and increase your understanding of linux.
If you adopt the strategy of selective backups, you can easily fit them on a floppy or three, rather than using a whole tape or zipdisk to backup what you have already on your installation media. I think that especially if you installed from a CD, the plain vanilla install like you did the first time, can put you back on your feet when combined with a backup of only those files you wrote or modified, and and any special software that wasn't included in the distribution. To find out what files and libraries are required to run an app, you can use
Another command that you can use to find out more about files is, strangely enough, file. File can be used as
which will give information about other files, as well as executables. Yet one more helpful command is which, used like
where executable is the command used to start the application as in
to find out where the executable is located, pretty handy if you are modifying your path statement.
I stress this because I know from experience that failing to backup your data is an extremely stupid and easy thing to do, but since I apart from the cardiac care unit and the nuclear reactor I don't have anything mission critical on my box right now, I'm still too lazy to back it up. Please excercise a little cautious computing if anyone's data needs to be secure
Exec "PROGNAME" exec progname -options &
the "&" causes the program to execute in the background, which keeps it from monopolizing X. Note that some apps, such as ImageMagick don't seem to want to share, and those will have to be exec'ed without the "&". Also non-X apps can usually be run by invoking an xterm or rxvt, in which case the titlebar can be changed to reflect the program name, as in
Exec "Top" exec color_xterm -font 7x14 -T Top -n Top -e top &
which starts a color_xterm running top. Top, in case you aren't familiar, basically lists the amount of resources each process is using. For more info type
or better yet just type
This one will add the contents of one file to another file, as in chapters 1 and 2 could be added together for reasons of continuity to make a fluid read that would otherwise be broken up by having to cat the successive chapters
cat hellaracket.au >/dev/audio or /dev/dsp
is another example of redirecting the output of a command or file to somewhere other than standard output which is another way of saying your monitor.
Another feature is command line batching of commands. If you type several commands separated by semicolons, each command will execute when the previous one exits. A good example, is:
make config; make dev; make clean; make zImage
which will perform each of the steps necessary to compile a kernel. As soon as the first command exits or is closed, the next one starts Any group of commands that you would like to run in succession can be done in this manner.
Another device you can use to your advantage with a little imagination is the pipe, signified by the "|" symbol. Pipe is a pretty good description of what it does, which is to "pipe" the output of one command into another command for further processing. One example that springs to mind is
cat filename | pr -l56>/dev/lp0
which come to think of it, is another example of redirection as well. The above command takes the results of the cat command pipes it to a filter "pr", and redirects the output to /dev/lp0 to print a file in a reasonably attractive manner. For some of the options available to "pr", try
This filter is particularly useful if you find lpr to be beyond your present capability, as I have :(. You should be aware however, that this will only work as root, or with a lot of permission hacking, which is probably best left undone, as it can cause security problems if /dev/lp0 is made available to regular users.
s2:12345:respawn:/sbin/agetty -L 9600 ttyS1 vt100
if modified to reflect the serial port used, in this case com port 1 in DOS lingo. This line can also be used with a 8086 or above to emulate a serial terminal, if used with the proper cable. The proper cable, usually called a null modem, is often sold as a serial printer cable.
A serial terminal is a very good option when used with a Linux box as it allows more than one user on the system at a reasonable cost compared to buying another computer. The local university surplus disposal has them for about $25US, and you may find them for free. 8086, 8088, and 286 boxes, which will also serve the purpose can be gotten just as cheaply, depending on what hardware is attached. The other thing you need is a comm program, Minicom and Kermit are two that spring to mind or perhaps Seyon if you're in X. I've never used any of these programs to connect directly to another computer as a terminal without a modem, so I don't know much about connecting with minicom in this manner, but Kermit seems to be pretty simple in this capacity Another use is to kill frozen X applications. I had a Netscape bus error problem before I got Andreas Theofilu's nets , and a terminal can be used to kill out of control processes quite easily, by logging in and using kill or similar(remember die?)command to wax it and you can regain your X session. Nearly any non-graphical task you can do on the console can be done on a serial terminal. One exception, virtual terminals can be worked around to a degree by usingsplitvt which cuts your screen into two parts and by using
CTRL-Wyou can switch between the upper and lower displays, and work alternately between the two, with the added advantage of seeing both screens at once. You can even be root on one while using a different account on the other screen, easily cut and paste from one editting session to another, check top or ps or many administrative tasks that require monitoring. It ain't X but it's pretty good for a text only environment.
See you next month!
Clueless at the Prompt #1 - February 1997
Clueless at the Prompt #2 - March 1997
Clueless at the Prompt #3 - April 1997
Clueless at the Prompt #4 - May 1997
Clueless at the Prompt #5 - June 1997
Clueless at the Prompt #6 - July 1997
Clueless at the Prompt #7 - September 1997
Clueless at the Prompt #8 - December 1997