Greetings From Jim Dennis
Well, the 2.2 kernel is finally out. Indeed the 2.2.1 patch has also made its way onto the scene (you just knew they'd find something worth fixing in the first week).
If you're considering upgrading you'll want to look through the list of required/suggested package upgrades to go with that. Although most code in userspace isn't affected much by kernel changes there are always some utilities and applications that will be.
Of course, you can install a new kernel right along side your existing one --- and reboot between them with glee. Remember LILO is a multi-boot utility as well as a boot loader --- so you can easily add new entries to it.
Thus upgrade will be much easier than the migration from 1.2 to 2.0 (when the structure of many /proc interfaces changed --- breaking the 'ps' related utilities). That's good since there are probably close to ten times more Linux users now.
Of course the faint-hearted can just wait for their friendly distribution maintainer to put out an all new version with the 2.2.x kernel and all the new utilities pre-built. However, what would the fun be in that.
To learn more about upgrading your kernel look LinuxHQ (http://www.linuxhq.com/). They have about a half dozen links to pages on the subject (particularly with lists of requisite package upgrades and links to the tar.gz files and even one site that has links to the requisite RPMs).
After you upgrade you'll want to keep you eyes on those sites, checking back over the next couple of months. There will probably be other packages that are found "wanting" (unready for 2.2).
If you get that all installed, read all my rantings for this month and are still bored --- take a look at the "Linux Tips & Tricks" site (http://www.patoche.org/LTT/) and considering adding your own suggestions to the mix.
I added a couple myself. I also suggested to the site maintainer that he link to LG's "2-cent Tips" and to the Linux-Tips HOWTO (http://metalab.unc.edu/LDP/HOWTO/Tips-HOWTO.html).
While we're on the subject of "tips" here's one for you budding shell scripters and programmers out there:
If you have to use /tmp --- do it safely. Sure, you script is running on a single-user workstation now. But eventually you'll use it on a multi-user machine or someone will copy it. There are all sorts of nasty tricks people can play on you involving symlinks in /tmp.
Here's one way:
TMPD=/tmp/$0$$$(date +%s) ## get a (hopefully unique) name ## use any reasonable method for this. OMASK=$(umask) umask 077 || exit 1 mkdir $TMPD || exit 1 trap 'rm -fr $TMPD; exit' 0 umask $OMASK
... this should either successfully make a safe, private directory under /tmp (and you use $TMPD for the rest of your temporary file operations --- using whatever names you want) or it should fail. There should be no race condition since the new directory should be made with the appropriate permissions in a single system call (and my strace output under Linux/bash confirms that).
The part to be careful of is the 'trap' clause. That should automatically remove the temp directory and files on exit (normal or in response to any trappable signals). (If you use a kill -KILL on that script while it's running --- it won't get a chance to clean up after itself, but a normal [Ctrl]-[C] and most other kill signals should be fine. I still suggest using your own private ~/tmp directory whenever that's feasible (but not if your $HOME is served over NFS).
I'll be teaching a class in shell scripting at Mission College (Santa Clara, CA) starting tomorrow. That should be interesting.
Answer Guy #1, January 1997
Answer Guy #2, February 1997
Answer Guy #3, March 1997
Answer Guy #4, April 1997
Answer Guy #5, May 1997
Answer Guy #6, June 1997
Answer Guy #7, July 1997
Answer Guy #8, August 1997
Answer Guy #9, September 1997
Answer Guy #10, October 1997
Answer Guy #11, December 1997
Answer Guy #12, January 1998
Answer Guy #13, February 1998
Answer Guy #14, March 1998
Answer Guy #15, April 1998
Answer Guy #16, May 1998
Answer Guy #17, June 1998
Answer Guy #18, July 1998
Answer Guy #19, August 1998
Answer Guy #20, September 1998
Answer Guy #21, October 1998
Answer Guy #22, November 1998
Answer Guy #23, December 1998
Answer Guy #24, January 1998