Cramsession Linux Newsletter

Cramsession.com Linux News Archive

Please note that I've stopped writing the Linux News as of January 30, 2003, as Cramsession has cancelled most of their newsletters. You can send any questions or comments about this content to me (sean at ertw . com)
People have been asking for a downloadable version of the archives. [My mbox (one big file, 1.4MB)] [Individual files, text, tarball] [Individual files, html, tarball]
If you're looking for more Linux content, you might like my blog.
Jan 30, 2003
  Linux News - Issue #117
Jan 23, 2003
  Linux News - Issue #116
Jan 16, 2003
  Linux News - Issue #115
Jan 9, 2003
  Linux News - Issue #114
Jan 2, 2003
  Linux News - Issue #113
Dec 19, 2002
  Linux News - Issue #112
Dec 12, 2002
  Linux News - Issue #111
Dec 5, 2002
  Linux News - Issue #110
Nov 28, 2002
  Linux News - Issue #109
Nov 21, 2002
  Linux News - Issue #108
Nov 14, 2002
  Linux News - Issue #107
Nov 7, 2002
  Linux News - Issue #106
Oct 31, 2002
  Linux News - Issue #105
Oct 24, 2002
  Linux News - Issue #104
Oct 17, 2002
  Linux News - Issue #103
Oct 10, 2002
  Linux News - Issue #102
Oct 3, 2002
  Linux News - Issue #101
Sep 26, 2002
  Linux News - Issue #100
Sep 19, 2002
  Linux News - Issue #99
Sep 12, 2002
  Linux News - Issue #98
Sep 5, 2002
  Linux News - Issue #97
Aug 29, 2002
  Linux News - Issue #96
Aug 22, 2002
  Linux News - Issue #95
Aug 15, 2002
  Linux News - Issue #94
Aug 8, 2002
  Linux News - Issue #93
Aug 1, 2002
  Linux News - Issue #92
Jul 25, 2002
  Linux News - Issue #91
Jul 18, 2002
  Linux News - Issue #90
Jul 11, 2002
  Linux News - Issue #89
Jul 4, 2002
  Linux News - Issue #88
Jun 27, 2002
  Linux News - Issue #87
Jun 20, 2002
  Linux News - Issue #86
Jun 13, 2002
  Linux News - Issue #85
Jun 6, 2002
  Linux News - Issue #84
May 30, 2002
  Linux News - May 30, 2002
May 23, 2002
  Pearl In The Shell
May 16, 2002
  Linux Filesystems - Part Two
May 9, 2002
  Inside The Linux Filesystem
May 2, 2002
  CD Burning Under Linux
Apr 25, 2002
  Star Office Vs. Open Office
Apr 18, 2002
  Surfing With Mozilla
Apr 11, 2002
  "We Don't Support Linux..."
Apr 4, 2002
  Visit The UNIX Library
Mar 28, 2002
  Linux and World Domination
Mar 21, 2002
  Working With Keyservers
Mar 14, 2002
  A Look At Public Key Cryptography
Mar 7, 2002
  Monitoring Systems With "vmstat"
Feb 28, 2002
  Star Office 6 Not to be Free for Linux?
Feb 21, 2002
  How Can Programming Benefit a Systems Administrator?
Feb 14, 2002
  Alias: It's Not Just a TV Show
Feb 8, 2002
  Using The diff and patch Utilities
Jan 31, 2002
  How To Detect Cracks
Jan 24, 2002
  Using Razor to Shave Away Spam
Jan 17, 2002
  Stomping Spam
Jan 10, 2002
  Sair Linux Courseware Review
Jan 3, 2002
  2002: The Year of the Penguin!
Dec 27, 2001
  UNIX Apps on a Windows Box?
Dec 20, 2001
  Directory Assistance
Dec 13, 2001
  How Do You Kill Zombies?
Dec 6, 2001
  Using Hard and Soft Symlinks
Nov 29, 2001
  Change Terminal-Based Apps Into Network Apps
Nov 22, 2001
  Adventures In Booting
Nov 15, 2001
  Getting To Know PAM
Nov 8, 2001
  Know Your Enemy
Nov 1, 2001
  Do Mulder and Scully Use X-Windows?
Oct 25, 2001
  A Quick Look at the RHCE Certification
Oct 18, 2001
  What's Up With Linux Certification?
Oct 11, 2001
  Express Yourself Regularly
Oct 4, 2001
  Advice For Lazy Penguins?
Sep 27, 2001
  NVIDIA Jumps On Linux Bandwagon
Sep 20, 2001
  Understanding DNS in a Linux Environment
Sep 13, 2001
  Be Careful With Binaries
Sep 6, 2001
  Party Like It's 999,999,999
Aug 30, 2001
  Rooting Out Memory Hogs
Aug 23, 2001
  Spin Your 'Top'
Aug 16, 2001
  Keeping Time With NTP
Aug 9, 2001
  Supporting True Type Fonts
Aug 2, 2001
  Getting Perl To Fetch
Jul 26, 2001
  Who's The Man?!
Jul 19, 2001
  Adobe Cracks The DMCA Whip
Jul 12, 2001
  Due Processes
Jul 5, 2001
  Going Adobe Free
Jun 28, 2001
  Don't Send Mixed SIgnals
Jun 21, 2001
  Everything is a File. (almost)
Jun 14, 2001
  Know Your Partitions
Jun 7, 2001
  Where it's "at"!
May 31, 2001
  A Sneak Peek at RedHat 7.1
May 24, 2001
  Scheduling Tasks With cron - Part 2
May 17, 2001
  Scheduling Tasks With cron
May 10, 2001
  Open Source - Seeing Through The FUD
May 3, 2001
  A Look At Ximian's New Release
Apr 26, 2001
  Rev Up Your X-Windows Session
Apr 19, 2001
  Wrangling With GNU Cash
Apr 12, 2001
  Tame the syslogd Daemon
Apr 5, 2001
  Test Your Admin Skills At Honeynet
Mar 29, 2001
  Software RAID on Your Linux Box
Mar 22, 2001
  Prevent Disasters: Back It Up
Mar 15, 2001
  Notes From Underground!
Mar 8, 2001
  SuSE 7.1 - A First Look
Mar 1, 2001
  Certification Boot Camp
Feb 22, 2001
  Understanding Runlevels
Feb 15, 2001
  What Are The Advantages of Joining a LUG?
Feb 8, 2001
  Diving For Perls
Feb 1, 2001
  How To Secure Your Linux Installation
Jan 25, 2001
  Linux Problem Solving
Jan 18, 2001
  Stand up and Be Counted!
Jan 11, 2001
  2.4.0 is Here!
Jan 4, 2001
  When will Mom use Linux?
Dec 28, 2000
  The Year in Review
Dec 21, 2000
  The SourceForge Solution
Dec 15, 2000
  How to Compile and Install the New Kernel
Dec 7, 2000
  Put Your E-mail Into A Blackberry Basket
Nov 30, 2000
  Using Perl With Linux
Nov 23, 2000
  Working With MP3's Under Linux
Nov 16, 2000
  Apache 2.0 alpha 4
Nov 9, 2000
  Dell loves Linux!
Nov 2, 2000
  What's Up With RedHat 7?
===========================================================
                        LINUX NEWS
            Resources & Links From CramSession.com
                Thursday, October 11, 2001
===========================================================

-----------------
TABLE OF CONTENTS
-----------------

1) Sean's Notes

2) Linux News

	Aussies say GPL is OK
	Interview with Linus
	Kernel 2.4.11 Released
	StarOffice offers IT real choice

3) Linux Resources

	Encrypted Filesystem Lab Notes
	Opportunistic Encryption
	PGP or GPG?
	LPI Crash Course
	Read and Write Excel Files in Perl

4) App o' the week

~~~~~~~~~~~~~~~~~~~~~~ ADVERTISEMENT ~~~~~~~~~~~~~~~~~~~~~~~

XML is the wave of the Future. Make sure you're ready to take
advantage of the skills needed in today's competitive market.
FirstClass Systems offers superior XML training presented
online with mentoring. Online Training is the most intelligent
way to learn anything!

http://ad.brainbuzz.com/?RC06&AIA34

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For information on how to advertise in this newsletter
please contact mailto:adsales@CramSession.com or visit
http://cramsession.com/marketing/default.asp

===========================================================
1) Sean's Notes
===========================================================

In previous articles I've used regular expressions to
perform various tasks.  You may remember them as a string of
punctuation that doesn't make any sense, but I hope that
after this week, you'll be able to use them in your work
with Linux.

A regular expression is nothing more than a pattern to be
matched.  They're used everywhere, from "awk" to "zegrep",
and luckily are fairly consistent.  They can be simple or
complex, it's up to you.

You've probably used a regular expression before without
even knowing it:

$ ps -ef | egrep sendmail

can be used to see if sendmail is running.  In this case,
"sendmail" is the regexp, and is the simplest form of all,
matching the string "sendmail" itself.  Thus, the following
will match...

sendmail
aaaasendmailzzzz

...but the following will not:

Sendmail
send mail
banana

In the first case, "sendmail" by itself matches the given
string of "sendmail".  The second string contains "sendmail"
within it, still valid.  However, being very literal,
"Sendmail" with a capital 'S' does not equal "sendmail", nor
does "send mail" (space).  Of course, banana isn't even close.

Now, suppose you wanted to match "sendmail", with or without
a capital 'S'.  We could construct two separate commands,
each with one variation, or we could make use of square
brackets : [].  Square brackets mean "one of the characters
inside is OK":

$ ps -ef | egrep '[sS]endmail'

This time, I protected our string with quotes because some
shells might start interpreting the special characters.
Looking at the regexp, it will match a string that starts
with either 's' or 'S', followed by "endmail".

What if we're looking for a string, but are not sure of a
letter?  For example, you're doing a crossword puzzle, and
need a five letter word that starts with "tr", and ends with
"ck".  In this case, the period has meaning in that it
matches any single character:

$ egrep 'tr.ck' /usr/dict/words

If you run that command, you'll probably get a whole list of
words, because egrep will look for substring matches if we
don't tell it otherwise.

To fix this one up, the ^ and $ characters are employed.
^ matches the beginning of a line, and $ the end of a line.
Since /usr/dict/words has one word per line, we can use:

$ egrep '^tr.ck$' /usr/dict/words

which means "find a line that begins with tr, has any
character followed by ck".  My search returned:

track
trick
truck

Two more characters will really demonstrate the power of
regular expressions: * and +.  * means "zero or more of the
previous", while + means "one or more of the previous"

The regexp 'hi*' will match "h", "hi", "hii" and so on, but
'hi+' will match only the latter two because of the
requirement for one i.  + and * may be combined with other
operators, such as .*, which means "anything".

Let's say you were trying to find the spelling of
"acquiescent" out of /usr/dict/words.  You knew it ends
with ent, so we'll craft our regexp starting there:

$ egrep 'ent$' /usr/dict/words

457 words on my machine, so we'll have to be a bit more
specific.

Knowing it starts with "a" doesn't help a lot, only
bringing it down to 71.

$ egrep '^a.+ent$' /usr/dict/words

I know it's got a q in there, but is it "acq" or "aq"?

$ egrep '^ac?q.+ent$' /usr/dict/words
acquiescent

Our final regexp refers to a string that begins with a, may
have a c, then has a q followed by an indeterminate number
of letters, but ending in ent.

One final aspect of regexps I'll explain today is similar to
the square brackets, but refer to strings.  To check on the
status of nfs, I want to make sure nfsd, portmap and
rpc.mountd are running.  I could run...

$ ps -ef | egrep nfsd
$ ps -ef | egrep mountd
$ ps -ef | egrep portmap

...but I'd rather run them as one command.  Parenthesis ()
and the | "or" operator mean that multiple strings can match:

$ ps -ef | egrep '(nfsd|mountd|portmap)'

will match any line that has either of the strings "nfsd" or
"mountd" (or both, for that matter).

Before I sign off, a common trick in shell scripts uses the
[] operators to correct a common flaw.  When I type:

$ ps -ef | egrep sendmail

I end up with:

......   sendmail: accepting connections
......   egrep sendmail

What's that "egrep sendmail" doing in there?  According to
Unix, it's to pump the output of ps -ef into the input of
egrep.  In order to do so, it has to create the egrep process,
which contains the "sendmail" string.  To prevent this,

$ ps -ef | egrep '[s]endmail'

As we learned above, the [] operator means "anything inside",
which can only be an 's' in this case.  "sendmail" does not
match "[s]endmail" (which is how would appear in the process
entry for egrep), so only bona fide sendmail processes are
shown.

So that's regexp in a nutshell.  There are a lot more
operators, especially once you get into the perl
implementation of it.  However, a basic understanding of
regexps will help you in your shell scripting, not to mention
shaving off a lot of keystrokes when doing your regular work.

Long live the Penguin,

Sean
swalberg@cramsession.com

Visit the Linux News Board at
http://boards.brainbuzz.com/boards/vbt.asp?b–2

===========================================================
2) Linux News
===========================================================

---------------------
Aussies say GPL is OK
---------------------
This report looks at the validity of Craig Mundie's "GPL is
Evil" speeches from an Australian standpoint. I'm sure you
won't be surprised at the results, but it's still a good
read.

http://australianit.news.com.au/articles/0,7204,2774764%5E15306%5E%
5Enbv%5E,00.html

--------------------
Interview with Linus
--------------------
Interviews with Linus are usually pretty good reading. In
this one, he talks a bit about what's on tap for 2.5/2.6,
and gives his take on the "GNU/Linux" vs "Linux" naming
debate. His answer to the latter question is always good
for a chuckle; this time is no exception.

http://www.osnews.com/story.php?news_id1

----------------------
Kernel 2.4.11 Released
----------------------
Once again, we've got a new kernel. Nothing too exciting,
just a lot of driver fixes. An interesting note in the
ChangeLog about a fix for x86 boxes with more than 8 CPUs,
so if you're in that lucky few, this one will be of special
interest.

http://www.kernel.org/pub/linux/kernel/v2.4/ChangeLog-2.4.11

--------------------------------
StarOffice offers IT real choice
--------------------------------
As I mentioned last week, StarOffice 6.0 beta was released,
and already I'm happy with it. It would appear that ZDNet is
also looking at it in a favourable light, even making
comparisons to Word. If you haven't had the chance to try out
StarOffice, give this article a read, then follow the links
to download a free office suite.

http://www.zdnet.com/products/stories/reviews/0,4161,2816213,00.htm
l

===========================================================
3) Linux Resources
===========================================================

------------------------------
Encrypted Filesystem Lab Notes
------------------------------
With the modular nature of Unix, adding a layer of encryption
on top of your filesystem isn't very hard. This set of notes
should be able to guide you through the process of keeping
your data protected.

http://www.zen-data.com/labnotes/lab002.html

------------------------
Opportunistic Encryption
------------------------
One of the original goals of the Free S/WAN project was to
create an implementation of IPSEC that can build tunnels on
demand, such that users don't even know their traffic is
protected. This summer, the goal was achieved in part, and
this document explains how to set up this very important
feature.

http://www.freeswan.org/freeswan_trees/freeswan-1.91/doc/opportunis
m.howto

-----------
PGP or GPG?
-----------
I've been a longtime user of PGP to secure my email, but
recently I've been meaning to make the switch to the Free
implementation, GPG. Since most of my friends use PGP, I
knew I'd run into some trouble, but luckily, this document
helped set me straight.

http://technocage.com/~caskey/gnupg/pgp2gnupg.html

----------------
LPI Crash Course
----------------
For those of you looking to challenge the LPI Linux
certification, O'Reilly has kindly made available a crash
course in the topic. Reading through, it's just as valid
for other Linux certifications, so keep this one handy
when you're studying.

http://linux.oreilly.com/news/lpilinux_0601.html

----------------------------------
Read and Write Excel Files in Perl
----------------------------------
Spreadsheet::WriteExcel and Spreadsheet::ParseExcel are two
Perl modules that allow you to read and write Excel files
from within Perl. This article explains the modules
themselves, and how to use them.

http://www-106.ibm.com/developerworks/linux/library/l-pexcel/

===========================================================
4) App o' the week
===========================================================
RADIUS is a common service to offer to keep track of users
and privileges. Routers and access servers can query a central
server, which greatly increases management. The FreeRADIUS
project is an improvement on the traditional Livingstone
RADIUS server, but with a whole whack of features not seen
in other implementations.

http://www.freeradius.org/

===========================================================
(C) 2001 BrainBuzz.com, Inc. All Rights Reserved.
===========================================================
_______________________________________________________

         This message is from CramSession.com.

You are currently subscribed to the
   Hottest Linux News and Resources
   as: sean@ertw.com

To un-subscribe from this newsletter by e-mail:
   send a blank email message to:
   mailto:leave-linuxnews-3825955Y@list.cramsession.com

-------------------------------------------------------

To Subscribe to this newsletter by e-mail:
   send a blank email message to:
   mailto:join-linuxnews@list.cramsession.com
_______________________________________________________