Ask Shadowman

October 2004

It's October again, which means that Halloween is just around the corner, and people are digging through the bargain bins, looking for the perfect finishing touches to round out those Shadowman costumes. Allow Shadowman to offer a bit of hard-won advice in this regard. First, don't skimp on the fedora; it's the centerpiece of the outfit, and spray-painting Grandpa's lid just won't cut it. Second, a cape of heavy black wool completes the look nicely, and also doubles as a thick, warm barrier against the chilling attacks of angry competitors. (It's only itchy until you get used to it.)

Got a question that you'd like Shadowman to answer? Ask him.

Compfreak shouted into the canyon below:

I have a Lexar Media Jumpdrive and the hardware browser sees it, but how do I mount it?

Shadowman echoes back in response:

If the hardware browser can see it, you're halfway home. Where you see the description of the Jumpdrive in the hardware browser, you're likely to see something like this, telling you where Linux finds the device:

Device: /dev/sda

To mount the device, first create a directory, let's say /mnt/jumpdrive, and then map the device to that new directory using the mount command, as follows:

mount /dev/sda /mnt/jumpdrive

If you plan on using this device on a regular basis, you can add the device to your filesystem table, kept in /etc/fstab, and it will be mounted automatically at boot time. If you're a RHEL customer, you can read lots more on this topic in the handy-dandy Red Hat Knowledgebase. Membership has its privileges.

By the way, if you're playing around with the hardware configuration on the box, it kinda goes without saying that you need to be using root access to do it. But hey, Shadowman said it anyway.

Mr. (or Mrs.) S pondered:

We have multiple RHEL3 servers installed. Is there a way we can download update with up2date and have them applied to different servers without having to download the same update multiple times?

Shadowman replies:

There are ways, and there are ways. One way is to grab the packages out of /var/spool/up2date, put them somewhere on a centrally mounted disk, and then use the "-k" switch when running up2date from your other systems. The -k switch allows you to specify a colon-separated path of directories, through which up2date will look before it tries to download the necessary packages from RHN.

The far more elegant way, though, is to lay your hot little hands on the Red Hat Network Proxy, which was designed for precisely this purpose. Not only that, but when you have a Proxy, you can also manage your own RPMs centrally, which is a pretty nifty tool for the hardworking sysadmin.

You should go read all about the Proxy. Go! Go now! You will totally dig it.

Skinman pointed out, very helpfully:

The previous Ask Shadowman references using comm command. However, no mention is made of the fact that comm requires sorted files as arguments. Results of comm on unsorted files will be less than optimal and users may miss the sorted issue in comm manpage.

Shadowman feels compelled to point out, in response...

...that the name of the column is "Ask Shadowman" and not "Tell Shadowman". Nevertheless, in the spirit of fair and even-handed "journalism", Shadowman admits to having made a teensy oversight, and provides the following remedy for the didactic reader:

sort file1 > file1.sorted && sort file2 > file2.sorted && comm file1.sorted file2.sorted -1 -2

For the seeker of knowledge, this command sorts the two files, puts the results into temporary files, and then runs comm on the newly-sorted files. The double-ampersands are shell-speak for "hey, run this command, but only if this last command worked."

That'll teach Shadowman to be a sloppy thinker.

John W. lobbed the following softball:

I find the questions asked and answered here interesting. Is there an archive where I can review past month's posted questions and their corresponding insightful answers?

And Shadowman takes a mammoth swing!

Flattery will get you everywhere, John. If Shadowman ever gets around to updating his Christmas card list, you will be the first addition. In the meantime, check out Shadowman's greatest hits here. Celebrate his entire catalog.