Date: Fri, 09 Aug 1996 20:15:45 -0500
From: David Ishee <firstname.lastname@example.org>
Subject: $0.02 tip for removing Control M in emacs
After looking at issue 8 about how to remove the pesky Control-M character in vi (vim or whatever) I had to also tell how it could be done in emacs. Say you loaded up a file that has the ^M all over the place. No problem, say M-x replace-string RET C-q C-M RET RET and you're done. Emacs rulz!!
Date: Tue, 13 Aug 1996 20:45:39 +0100
From: Caolan McNamara <email@example.com>
Subject: XTerm title tricks in Linux Gazette #6.
Just scanning through back issues and came across the tip to keep the hostname of the machine your currently logged into in your xterm titlebar (and wanted to add my 2 cents).
I work in a room of 30 linux boxes, so to keep track of which one I'm logged into despite logging in from one to another and logging out, I put
alias precmd 'echo -n "\033]2;"`hostname`"\007"'(course anything could be put here)
-- Real Life: Caolan McNamara Local: caolan@skynet College: firstname.lastname@example.org Quote: Happiness is a small sig.
Date: Fri, 23 Aug 96 10:30:06 EDT
From: email@example.com (Daniel Engel)
Subject: vi trick
This is how you comment in a block of code using vi:
:START,ENDs/^/# /where START is the starting line number and END is the ending line number.
i.e. :10,30s/^/# /comments in line 10 through line 30 of the current buffer (file).
same idea can be used for indentation and/or commenting out.
d. at Nortel (firstname.lastname@example.org)
Date: Tue, 20 Aug 1996 12:38:12 -0600 (MDT)
From: email@example.com(Jim Murphy)
Subject: Article submission: Newbie Tip on Finding
As a new linuxer, I had a hard time finding my way around the filesystem, and discovered that I often had to find a file for some reason or other. I knew the find command was out there, but remembering all the options required to make it search the right places, find the right files, and print the right answers was something I couldn't do, at first. So I made up my own command, using a shell script, and called it "fnd".
"fnd" takes one argument, the name of the file you want to locate, complete with any wildcards you may wish to include, and pipes its output to "less", which then allows you to view a large list of results. What you get, on each line of output, is the complete path to anything which you're looking for! I find it amazingly useful (as is a rough familiarity with the "less" command.) Here's my script:
#!/bin/bash find / -iname $1 -mount -print |less
That's it! The -iname option tells find to be case insensitive, the $1 is a variable which subs in your commandline argument, -mount tells find not to descend directories on other file systems like your cd-ROM (because mine is wonky and locks up the machine if it is accessed;). The -print option is required or you don't get any output! (Get used to it, it's *nix...) The | symbol tells find to direct its output to the "less" command so you can see your results in style! Don't forget the / right after the find command, or it won't know where to look. - Enjoy! You won't regret the time you spend keying in this little shortcut, and don't forget to put it in a "bin" or "sbin" directory after chmod'ing it to be executable.
Date: Tue, 27 Aug 1996 21:49:27 +0100 (GMT+0100)
From: "Robert S. Wolfram" <0wolfram01@Lelystad.Flnet.nl>
Subject: Masquerading with sendmail
First of all, I think it is wonderful that John devoted that much of his spare time to start and maintain the Linux Gazette. I am happy to see that it is being continued. Keep up this beautiful project!
I was very pleased with Leifs Queue-R-Mail Howto, published in issue 6 of the Gazette, but I was still left with one drawback. I have a PPP dialup account at a local provider, and when sending remote mail, the "From" address and "Return Path" should be masqueraded to match my address at the provider. If I would fill the $M macro in my 'sendmail.cf' (as installed by Slackware 3.0), it would only change my domain, so it needed some adjustment. I made some direct changes to 'sendmail.cf', but I did make a backup before trying anything! Here are the changes I made:
> # Before the edits < # After the edits
First of all, I filled the $M macro for masquerading my domain and added a $N macro for masquerading my username:
> DM < DMlelystad.flnet.nl < DN0wolfram01
Disable masquerading for the local mailer in ruleset 40:
> R$* $: $1 @ $M add local qualification < #R$* $: $1 @ $M add local qualification
Include username in remote mail masquerading (rulesets 31 and 61):
> R$* < @ $+ @ $+ > $@ $1 < @ $3 > $M is defined -- use it < R$* < @ $+ @ $+ > $@ $N < @ $3 > $M is defined -- use it > R$+ $: $1 < @ $M > user w/o host < R$+ $: $N < @ $M > user w/o host
If you send your mail as root, you might want to remove its special treatment:
> #CLroot > CEroot < #CLroot < #CEroot
After sending 'sendmail' a HUP signal, my mail got masqueraded so that
the receiver could just reply to the correct mailbox.
First, to find ruleset xx, just search for Sxx in the beginning of a line. Secondly, tab characters between the fields in the rewriting rules are REQUIRED!!! Make sure you do not change those into spaces!
Well, those were my $0.02. I hope it was still readable.
Rob S. Wolfram firstname.lastname@example.org email@example.com W3: http://www.flnet.nl/~0wolfram01 ========================================================================= L I N U X : T H E C H O I C E O F A G N U G E N E R A T I O N =========================================================================
Since this FAQ is comes up a very often in comp.os.linux.*, and since it's already mentioned in kernels 2.0.12+ in /linux/Documentation/Changes and in some News papers (still one contacting me today: The editor of the german magazine UNIXopen.) without any request from us. So I'm going to ask for you to put something in your interesting magazine. It's is how to avoid a lot of problem when upgrading a Linux box. There's a easy way, and some scripts to run. All the stuff is free, and is available by ftp, located at: ftp://ftp.wsc.com/pub/freeware/linux/update.linux/
The upgrade is full, it means it will upgrade any system from 1.2.x (sorry I didn't test any earlier setup). It will be right for anyone from new Linux users to experts (no knowledge is required, no questions are done: all is detected and worked fine for all people who tested, except non-Lilo users since I force Lilo v19 to install. This will change next.)
All the upgrade is always up to date, and only fully tested packages are included (!). For example, I didn't install kernel 2.0.5 when it comes out since I've found out a bug in the code (reported to Linus who did 2.0.6 as a patch). Current upgrade contains:
All is NOT installed when requested. For more details,
see README file at
I know some mirrors exist in Europe as:
Note: I'm French, and I've moved two months ago from France. So sorry if my American is not yet plain ;-)
David Bourgin - Netware/Unix administration/security.
I'm a netsurfer, and as such, a citizen of the worlda.
This page written and maintained by the Editor of Linux Gazette, firstname.lastname@example.org