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, February 7, 2002
===========================================================

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

1) Sean's Notes

2) Linux News

	E*Trade Moves to Linux Servers
	Not Quite Top 40, but...
	Solaris 9: Major Advance
	GNOME and .NET? Say it Ain't So!

3) Linux Resources

	How To Create The Favorite Icon
	Beginner's Guide to Armoring Linux
	Solaris NIS+ FAQ
	Automate Command Line FTP
	IPv6 For Linux

4) App o' the Week


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

Try Our IT Certification Courses FREE! SmartCertify Direct
gives you classroom-quality IT training at a fraction of the
cost of traditional courses. You'll get 24-hour online mentoring
from certified advisors, hands-on interactive exercises, the
popular Test Prep exams and more! Choose from MCSE, Cisco, A+,
CIW, Linux, and many other courses. Click below to try them
all FREE and register to WIN a state of the art Dell PC!

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

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

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
===========================================================

Unix, as you may have observed, heavily promotes the sharing
of source code.  Its command line interface also lends itself
to plain text-based documents.  Thus, it should be no surprise
that Unix has a rich set of text processing commands.

One of the more useful utilities is the diff and patch
combination.  "diff" returns the difference between a set of
files (confusingly referred to as a "diff"), and patch applies
the changes specified in the diff to a file or files.

Programmers, authors, and web programmers love this.  If
you've got 5,000 lines of text, and change three lines, you
can produce a diff of perhaps only a dozen lines.  This diff
can be sent around and applied with patch.  Not only does it
save space, but the diffs themselves are easily read so the
changes stand out.  Another situation, where two people make
changes in different parts of the document, is also handled
with diff/patch.  Both diffs can be applied, and the document
is current.  If each person were to send out copies of their
modified document, there is no way to tell which is current.

>From /tmp, I'm going to make a two copies of my services file:

$ cp /etc/services test.orig
$ cp /etc/services test

(the services file lists the port->service mappings, such as
TCP port 25 is SMTP.  A very handy reference)

Then, I'll make a change to test by adding a line to the end:

$ echo "sometest     1234/tcp    #testing" >> test

And then I'll run diff:

$ diff test.orig test
512a513
> sometest     1234/tcp    #testing

When using diff and patch, remember that the original file goes
first, and the new file goes second (in the case of diff).

The '>' symbol tells me that a line was added, and the numbers
above say that it was at line 513.  The problem with this type
of diff is that there is no context, just an instruction to
add in a new line.  The unified diff format takes care of this,
and a few more problems:

$ diff -u test.orig test
--- test.orig	Wed Feb  6 18:34:38 2002
+++ test	Wed Feb  6 18:39:29 2002
@@ -510,3 +510,4 @@

 # Local services
 test		34343/tcp	#test
+sometest     1234/tcp    #testing

Here you can see that some of the text surrounding the change
has been included.  Thus, multiple patches can be applied to
the same file without a great worry of collision.  The unified
diff format isn't perfect, though.  Sometimes, especially in
source code, you may have to make a couple of the patches by
hand, because the amount of context included wasn't enough
for patch to figure out where it should be.

I'm going to run that last one into a file, which I'll call
test.diff:

$ diff -u test.orig test > test.diff

test.diff is what I'd distribute as my diff, had I needed
to send around this patch.

Now, I'd like to patch test.orig to be at the same level
as test:

$ patch test.orig test.diff
patching file test.orig

The easiest use of patch is to pass it the file name, and
then the name of the diff.  I can verify that it worked by
comparing test.orig and test:

$ diff test.orig test
$

In the real world, you may have multiple files, with multiple
directories.  The unified format handles this nicely,
packaging all the patches into one directory:

$ diff -uNr directory.orig directory.changed > difffile

-N tells diff to recognize the creation of new files in
directory.changed, and -r specifies that it should descend
into directories recursively.

With a big patch file like difffile, I can send it directly
to patch with:

$ patch -p0 < difffile

Note the direction of the arrow this time.  We're sending
the contents of difffile to the standard input of patch.
We could have also done the same thing with

$ cat difffile | patch -p0

What's -p0 do, though?  Recall that we executed diff from
the directory above "directory.changed".  Thus, if we're
reflecting a change in a file called README, it's actually
directory.changed/README within the diff.  To apply the
patch, we must also be in the same directory relative to
our unpatched code.  The -p option tells patch how many
directories to strip off the top (in this case, none).
Had we been in directory.orig, we'd need -p1.  You can
usually tell that you're in the wrong directory (or need
to play with the values of -p) if you see the following:

$ patch -p0 < /tmp/test.diff
can't find file to patch at input line 3
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|--- test.orig	Wed Feb  6 18:34:38 2002
|+++ test	Wed Feb  6 18:39:29 2002
--------------------------
File to patch:


Hit ^C (control-C) to abort, and fix your directory problem.

Diff and patch are easy and efficient ways of sending out
changes to source code, or almost any type of document.
Being able to patch will save you time downloading kernel
updates for sure!  If you've ever made a contribution to an
Open Source project (even if it's just correcting some
spelling, or fixing documentation), the project team will
surely appreciate your contribution in the form of a
unified diff.

Long live the Penguin,

Sean
mailto:swalberg@cramsession.com

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

-------------------------------
E*Trade Moves to Linux Servers
-------------------------------
"The online brokerage is moving its computer systems over to
IBM servers that run the operating system. In a statement,
E*Trade cited cost savings and performance as reasons for
switching to Linux." This is the first I've heard of
someone in the financial sector doing this!

http://www.newswire.ca/releases/January2002/31/c7527.html

-------------------------
Not Quite Top 40, but...
-------------------------
This online radio station (and on air, in some locations)
is going to read the Linux source code on the air. All of it.
I couldn't seem to get a connection when I tried, but out
of curiosity I'll continue to try to give it a whirl.

http://radioqualia.va.com.au/freeradiolinux/

-------------------------
Solaris 9: Major Advance
-------------------------
This news report tells of some of the features we can expect
to see in Solaris 9. SSH and Kerberos are now standard, plus
difficult-to-secure applications like telnet and NFS can be
left out of the install. Besides a lot of new enhancements,
Solaris 9 is supposed to have Linux-compatibility features.
GNOME has been left out of this one, but it's supposed to be
an add-on.

http://www.eweek.com/article/0,3658,s%253D701%2526a%253D21767,00.as
p

----------------------------------
GNOME and .NET?  Say it Ain't So!
----------------------------------
GNOME leader Miguel de Icaza says that GNOME will start to
use Microsoft's .NET in the future. I'm no expert on .NET,
but I'm still pretty skeptical.

http://theregister.co.uk/content/4/23919.html

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

--------------------------------
How To Create The Favorite Icon
--------------------------------
Until Mozilla started supporting the "favorite icon" feature,
I ignored it. Basically, Internet Explorer tries to download
a file called "/favicon.ico" from every website you hit. If
a file is returned, it's used next to the site's name in the
Favorites menu. Here's how to create a "favorite icon" using
the GNU tools.

http://www.mavetju.org/unix/favicon.php

-----------------------------------
Beginner's Guide to Armoring Linux
-----------------------------------
Lance Spitzner is a big name in Unix security. Here are his
guidelines for securing Linux servers that want to play on
the Internet. Though this document is somewhat dated, all of
the concepts are sound.

http://www.enteract.com/~lspitz/linux.html

-----------------
Solaris NIS+ FAQ
-----------------
NIS+ is a way of synchronizing passwords between Solaris
servers, and to a limited extent, Linux servers. If you're
the one responsible for the NIS+ server, this FAQ will be
right up your alley. I can't count the number of times I
referred to it when I was in that role.

http://www.eng.auburn.edu/users/rayh/solaris/NIS+_FAQ.html

--------------------------
Automate Command Line FTP
--------------------------
The command line client for FTP is more powerful than you
might think. From the .netrc file, you can have it login to
sites for you, and execute frequently-used command sequences.
This page has a description of what can be done, along with
several examples.

http://www.mavetju.org/unix/netrc.php

---------------
IPv6 For Linux
---------------
Linux has supported IPv6, the next generation Internet
Protocol, for some time now. The Internet doesn't support it
as a whole, so you have to tunnel it. This site, based in
Canada, allows you to join a global tunnel, and get started
into IPv6.

http://www.freenet6.net/

===========================================================
4) App o' the week
===========================================================

You're probably familiar with filename completion in the
shell... Hit tab, and you get a list of all the filenames
that begin with what you've typed so far. If there is
only one, it finishes it off for you. But wouldn't it be
great if this extended to other programs? Type "ssh TAB"
and you get a list of all the hosts you regularly SSH to?
Or pull up a list of NFS shares when you type in a hostname?
Here you go.

http://www.caliban.org/bash/index.shtml#completion

===========================================================
(C) 2002 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
_______________________________________________________