Ask Shadowman

September 2004

September. Near time for the birds to be heading South for winter. Unless they're those extreme birds who say "Rad" and "Dude" and drink crazy sweet fizzy power drinks and like to go North for winter and South for summer to get the most extreme weather. Or if they're in the southern hemisphere where flying South for the winter is extreme. Time too for one extreme bird who likes tough questions and goes by one name, like Jehosophat or Chewbacca, he is... the Shadowman.

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

J(K) had this to say:

One can easily find differences in files by using the diff command, but how can one find similarities and output them? For example, say you have two large comma separated flat text files and you wish to output the set of lines that only exist in BOTH files, as opposed to the differences between them?

This is, apparently, not as simple as doing an "sdiff -o somefile file1 file2"; because somefile will only contain the similar lines up to the first difference and then stop.

Shadowman says:

That it will laddy. What you're looking for is "comm". Comm will compare files line by line and report differences and similarities.

If you do "comm file1 file2", you will get the default three column output. Column 1 will be the lines unique to file1, column 2 will be those unique to file2, and column three has what you're looking for. It will have the lines common to both.

Now, since you may not want to see all of the differences, as Shadowman suspects you might not, or if the output will be too cluttered, you can shift off any of the columns with a -1, -2, or -3 respectively.

In your case run this up the flagpole:

comm -1 -2 file1 file2

And see if she don't salute.

Alexander S. couldn't hazard a guess:

Haloo.. My trouble is : I can quit from startx when I boot Red Hat Linux. It's automatic go to login screen with graph.

My Question is : How to disable that function and enabled again when I need it. Please how to do that in terminal or control panel.

Thanx a lot

Shadowman says:

Shadowman doesn't now what the heck you just said, but you moved him. As does any question looking for a command line solution. You got moxie, kid.

Shadowman's pretty certain you mean to edit your run level. From the commmand line, as root, edit /etc/inittab and look for a line like:


And change the 5 to a 3. The next time you boot up, it will stop at the text prompt, and you can 'startx' anytime you need the GUI.

Godspeed Alexander S. Shadowman is with you.

Anandsuaj N axed:

how do recovery the boot loader in Fedora core -1

Shadowman says:

Shadowman is probably wrong to assume you made a boot disk. But if you did, you can boot from that floppy and try:

/sbin/grub-install /dev/hdx

Where x is the drive you want to get grubby. If you haven't made a boot disk, you can do this by booting the install media and going into rescue mode.

Shadowman likes to do other crazy stuff. For example. You can boot back into the installer, choose system upgrade and upgrade the boot loader to grub.