Skip to contentSkip to conversation

tar for "full" floppy backup?

DISCUSSION Jerry James Haumberger 8 participants 19 messages Dec 8, 2002 – Feb 20, 2003 1 message not in the archive

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines
Quoted 6 lines

One of these commands..

 # man tar
 # info tar
 # tar --help
Quoted 8 lines
Quoted 1 line

..will give you all information you need about your tar version.

"all" information? Hardly. Neither "man tar" nor "tar --help" gave *me* enough information to be able to answer his original question (though it did point me to the -M option, which I suggested trying), and my system (like many; it really has not caught on, despite pressure from the FSF crowd) does not even have the "info" system installed. (Does BasicLinux install it?)

BasicLinux does not install the info system, but I'm certain it could be obtained from the Slackware 3.5 distribution.

I carefully consulted the man and tar --help information, three of the SAMS thick manuals, Linux for Dummies, and even the Linux Companion for System Administrators (by Jochen Hein), but none of these offered enough examples or clearly working commands to accomplish what I was told by consulting the linux-newbie list. Also, I came here by the suggestion of Steven Darnold, who is the author of the BasicLinux distribution.

As it stands, it's possible to backup to multiple floppy disks with tar, but these cannot be compressed during the archival process. (The tar program itself reports that it's not possible, if you attempt to use the compression options.) The BasicLinux system, even with the addition of several full programs to enhance it for my purposes, does not exceed 10 megabytes. So for this reason, I still found it personally adequate to attempt a multiple floppy disk tar archive without the benefit of compression. I still plan, however, to use a combination of tar and gzip for backing up selected documents onto floppy disks, along with other important configuration files on a more frequent schedule.

A few more notes: I should have said that the badblocks (not the badblock) command is used for checking floppies (BasicLinux has this command), although when you fdformat floppies, it will tell you if there is a bad area on it.

This is the style of backup I've chosen for this system. No one, though, should feel that this is the expected or "normal" method of backup for typical Linux systems. We would normally expect a Linux system on a network backup routine, or at least with a method of backing up to tape, another hard drive or zip drive.

Quoted 4 lines

So this was almost a textbook example of a good question for this list... one that needs more than RTFM answers, but a response (which it eventually elicited) from someone who could provide an example of how to do it.

Thank you, Ray. I'd consider that a reasonable summary of the matter.

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#2 lore raw
In reply to [email protected]

I wouldn't try that in that way, but the basic idea might work. I say might because I've never tried this and have never heard of any success with this idea either. One might do something like: tar czf * | tar cmvf
- /dev/fdd0/backup.tar.gz. This pipes the compressed result into a multivolume media result if it works.

Jude <dashielljt(at)gmpexpress-dot-net>

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#1 lore raw
In reply to Jerry James Haumberger
Quoted 4 lines · Jerry James Haumberger

As it stands, it's possible to backup to multiple floppy disks with tar, but these cannot be compressed during the archival process.

Why not use tar twice: first with -zcf to make a compressed archive and then with --multi-volume to write the archive to floppy. Of course to retrieve it, you will also have to use tar twice: first with --multi-volume to reconstruct the archive and then with -cvf to unpack it.

Cheers,
Steven

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#5 lore raw
In reply to [email protected]

Hello Gents , One word , df . Hth , JimL

Quoted 9 lines · On Mon, 9 Dec 2002 [email protected] wrote:
Quoted 2 lines · dashielljt

I've never tried this and have never heard of
any success with this idea either.

I do not see the problem. It is easy to create a compressed archive file (let's call it backup.tgz). Tar happily tars a single file, so why can't it tar backup.tgz (multi-volume)?
Cheers,
Steven

Signature · 10 lines
       +------------------------------------------------------------------+
       | James   W.   Laferriere | System    Techniques | Give me VMS     |
       | Network        Engineer |     P.O. Box 854     |  Give me Linux  |
       | [email protected] | Coudersport PA 16915 |   only  on  AXP |
       +------------------------------------------------------------------+
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#3 lore raw
In reply to dashielljt
Quoted 3 lines · dashielljt

I've never tried this and have never heard of
any success with this idea either.

I do not see the problem. It is easy to create a compressed archive file (let's call it backup.tgz). Tar happily tars a single file, so why can't it tar backup.tgz (multi-volume)?

Cheers,
Steven

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#6 lore raw

pcmcia-cs quit working

In reply to [email protected]

Howdy, Y'all:

Now when I plug in any of four cards there are no
beeps and no modules are loaded. Under Windows98se these cards are still recognized, so it seems to be a linux problem rather than a hardware problem.

The last thing I edited before things quit working was
/etc/pcmcia/ as I was trying to get my system to recognize a Belkin 11Mbps-Wireless-Notebook-Network-Adapter model F5D6020.

I've:

/usr/src/linux# make oldconfig && make install && make modules
&& make modules_install

/usr/src/pcmcia-3.2.3# make config && make all && make install

/usr/src/linux-wlan-ng-0.1.16pre7# make config && make all
&& make install

I had pcmcia-cs v3.2.3 working. My system was recognizing and
auto-configuring the other three pc cards, Now, if I try to 'modprobe ds' I get these error messages:
/lib/modules/2.2.19/pcmcia/ds.o: init_module: Device or resource busy /lib/modules/2.2.19/pcmcia/ds.o: Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters /lib/modules/2.2.19/pcmcia/ds.o: insmod /lib/modules/2.2.19/pcmcia/ds.o failed
/lib/modules/2.2.19/pcmcia/ds.o.gz: init_module: Device or resource busy /lib/modules/2.2.19/pcmcia/ds.o.gz: Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters /lib/modules/2.2.19/pcmcia/ds.o.gz: insmod /lib/modules/2.2.19/pcmcia/ds.o.gz failed /lib/modules/2.2.19/pcmcia/ds.o.gz: insmod ds failed

Also 'depmod -a' now returns:
depmod: *** Unresolved symbols in /lib/modules/2.2.19/block/linear.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/block/raid0.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/block/raid1.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/block/raid5.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/ipv4/ip_masq_autofw.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/ipv4/ip_masq_cuseeme.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/ipv4/ip_masq_ftp.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/ipv4/ip_masq_irc.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/ipv4/ip_masq_mfw.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/ipv4/ip_masq_portfw.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/ipv4/ip_masq_quake.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/ipv4/ip_masq_raudio.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/ipv4/ip_masq_user.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/ipv4/ip_masq_vdolive.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/ipv6/ipv6.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/appletalk.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/ax25.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/econet.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/gamma.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/i2o_pci.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/i2o_scsi.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/i810.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/ipx.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/mga.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/netrom.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/r128.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/rose.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/tdfx.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/misc/x25.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/net/cops.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/net/ibmtr.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/net/irda.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/net/lanstreamer.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/net/ltpc.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/net/olympic.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/net/sktr.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/pcmcia/aha152x_cs.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/pcmcia/apa1480_cb.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/pcmcia/fdomain_cs.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/pcmcia/ibmtr_cs.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/pcmcia/qlogic_cs.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/3w-xxxx.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/53c7,8xx.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/AM53C974.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/BusLogic.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/NCR53c406a.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/a100u2w.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/advansys.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/aha152x.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/aha1542.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/aha1740.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/aic7xxx.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/atp870u.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/cpqfc.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/dtc.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/eata.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/eata_dma.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/eata_pio.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/fdomain.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/g_NCR5380.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/gdth.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/ide-scsi.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/imm.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/in2000.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/initio.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/ips.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/megaraid.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/ncr53c8xx.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/osst.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/pas16.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/pci2000.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/pci2220i.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/ppa.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/psi240i.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/qlogicfas.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/qlogicfc.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/qlogicisp.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/scsi_debug.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/seagate.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/sim710.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/sym53c416.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/sym53c8xx.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/t128.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/tmscsim.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/u14-34f.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/ultrastor.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/scsi/wd7000.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/usb/microtek.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/usb/usb-storage.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/video/aty128fb.o.gz
depmod: *** Unresolved symbols in /lib/modules/2.2.19/video/matroxfb.o.gz

What is wrong? How do I fix it? What list do I go to for help?

Thanks,
Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#7 lore raw

string manipulating?

In reply to [email protected]

Howdy, Y'all:

Using 'grep' I've parsed some stdout to lines ending in
...(123.45.67.89):
How can I either:
extract the last 17 characters
all characters after the first "("
all characters from "(" to ")"
?

I tried
cut -c ".0123456789" filename.txt
but it returns
cut: invalid byte or field list.
:-|

Regards, Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#8 lore raw

Re: string manipulating?

how 'bout

cut -d\( -f2

-jdr-

Quoted 17 lines · Chuck Gelm

Howdy, Y'all:

Using 'grep' I've parsed some stdout to lines ending in
...(123.45.67.89):
How can I either:
extract the last 17 characters
all characters after the first "("
all characters from "(" to ")"
?

I tried
cut -c ".0123456789" filename.txt
but it returns
cut: invalid byte or field list.
:-|

Quoted 6 lines

Regards, Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#11 lore raw

Re: string manipulating?

In reply to Chuck Gelm

Maybe something like:

grep $your_options | cut -f2 -d( | cut -f1 -d)

That might work. Hard to say for sure, but it looks right. Should give you just the IP address. HTH

--Brian Jackson

Quoted 16 lines · Chuck Gelm

Howdy, Y'all:

Using 'grep' I've parsed some stdout to lines ending in
...(123.45.67.89):
How can I either:
extract the last 17 characters
all characters after the first "("
all characters from "(" to ")"
?

I tried
cut -c ".0123456789" filename.txt
but it returns
cut: invalid byte or field list.
:-|

Quoted 6 lines

Regards, Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#12 lore raw

Re: string manipulating?

Oops. I meant:

grep $your_options | cut -f2 -d\( | cut -f1 -d\)

Quoted 32 lines · Brian Jackson

Maybe something like:

grep $your_options | cut -f2 -d( | cut -f1 -d)

That might work. Hard to say for sure, but it looks right. Should give you just the IP address. HTH

--Brian Jackson

Quoted 15 lines · Chuck Gelm

Howdy, Y'all:

Using 'grep' I've parsed some stdout to lines ending in
...(123.45.67.89):
How can I either:
extract the last 17 characters
all characters after the first "("
all characters from "(" to ")"
?

I tried
cut -c ".0123456789" filename.txt
but it returns cut: invalid byte or field list.
:-|

Quoted 6 lines

Regards, Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Quoted 5 lines

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#9 lore raw

Re: string manipulating?

In reply to Jim Reimer

Hi, Jim:

Thanks, that works great.
Please explain:

\( is the left parenthesis escaped (?)

'-f' is 'output only these fields'
what does the '2' of '-f2' do?

chuck

Quoted 31 lines · Jim Reimer

how 'bout

cut -d\( -f2

-jdr-

Quoted 23 lines · Chuck Gelm

Howdy, Y'all:

Using 'grep' I've parsed some stdout to lines ending in
...(123.45.67.89):
How can I either:
extract the last 17 characters
all characters after the first "("
all characters from "(" to ")"
?

I tried
cut -c ".0123456789" filename.txt
but it returns
cut: invalid byte or field list.
:-|

Regards, Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#10 lore raw

Re: string manipulating?

Quoted 7 lines · Chuck Gelm

Hi, Jim:

Thanks, that works great.
Please explain:

\( is the left parenthesis escaped (?)

yes - we're defining the left paren as the field delimiter, and cut will complain and refuse to work if you just give it -d(

Quoted 3 lines

'-f' is 'output only these fields'
what does the '2' of '-f2' do?

-f takes a list of fields to output, so in this case, -f2 means to output the second field. If you needed more fields, you could use something like '-f1,3,5' (fields 1, 3, and 5) or '-f1-4' (fields 1 through 4), or whatever, depending on the need.

Quoted 3 lines

chuck

73,
-jdr-
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#13 lore raw

Re: string manipulating?

In reply to Brian Jackson

Hi, Brian:

Thanks. Your suggestion is the similar to Jim's with
the arguments reversed.

You and Jim have fed me. Thanks.
Please teach me to fish. ;-)

I don't understand the '-f1' and '-f2' arguments.

IMHO, 'man cut' and 'info cut' are equally obfuscating:

-f, --fields=LIST
output only these fields

duh, what!

Please briefly explain.

Regards, Chuck

Quoted 47 lines · Brian Jackson

Oops. I meant:

grep $your_options | cut -f2 -d\( | cut -f1 -d\)

Quoted 39 lines · Brian Jackson

Maybe something like:

grep $your_options | cut -f2 -d( | cut -f1 -d)

That might work. Hard to say for sure, but it looks right. Should give you just the IP address. HTH

--Brian Jackson

Quoted 15 lines · Chuck Gelm

Howdy, Y'all:

Using 'grep' I've parsed some stdout to lines ending in
...(123.45.67.89):
How can I either:
extract the last 17 characters
all characters after the first "("
all characters from "(" to ")"
?

I tried
cut -c ".0123456789" filename.txt
but it returns cut: invalid byte or field list.
:-|

Quoted 7 lines

Regards, Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#14 lore raw

Re: string manipulating?

Okay it goes like this:

grep $your_options | cut -f2 -d\( | cut -f1 -d\)

the second part -- cut -f2 -d\( -- says to cut what comes out of grep into fields using ( as the delimiter -- remember, it has to be escaped

the third part -- cut -f1 -d\) -- says to cut the output of the second part into fields using ) as the delimiter

So if you start out grep'ing your file with output that looks like:

...(123.45.67.89):

feed that through -- cut -f2 -d\( -- and you get:

123.45.67.89):

Which is the second field [-f2] after the cut [-d\(] You then feed that through -- cut -f1 -d\) -- and you get:

123.45.67.89

The first field[-f1] after the cut [-d\)]

I hope this didn't confuse you more. It is kind of hard to put this in writing.(for me anyways)

--Brian Jackson

Quoted 15 lines · Chuck Gelm

Hi, Brian:

Thanks. Your suggestion is the similar to Jim's with
the arguments reversed.

You and Jim have fed me. Thanks.
Please teach me to fish. ;-)

I don't understand the '-f1' and '-f2' arguments.

IMHO, 'man cut' and 'info cut' are equally obfuscating:

-f, --fields=LIST
output only these fields

Quoted 40 lines

duh, what!

Please briefly explain.

Regards, Chuck

Quoted 32 lines · Brian Jackson

Oops. I meant:

grep $your_options | cut -f2 -d\( | cut -f1 -d\)

Quoted 25 lines · Brian Jackson

Maybe something like:

grep $your_options | cut -f2 -d( | cut -f1 -d)

That might work. Hard to say for sure, but it looks right. Should give you just the IP address. HTH

--Brian Jackson

Quoted 14 lines · Chuck Gelm

Howdy, Y'all:

Using 'grep' I've parsed some stdout to lines ending in
...(123.45.67.89):
How can I either:
extract the last 17 characters
all characters after the first "("
all characters from "(" to ")"
?

I tried
cut -c ".0123456789" filename.txt
but it returns cut: invalid byte or field list.
:-|

<snip>

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#16 lore raw

Re: string manipulating?

In reply to a message not in the archive

Thanks, Jim & Brian:

[info|man cut]

LemmeC if I understand the
'-f' fields=LIST

The LIST is a list of enumerated fields, i.e.
field1, field2, field3,... [ala: 1,2,3,4,5,6]
each separated by the delimiter. So, if "("
is a delimiter, then the following strings: v
Interesting ports on as1-216-68-15-180.fuse.net (216.68.15.180):
Interesting ports on as1-216-68-15-184.fuse.net (216.68.15.184):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
This is field 1 and this is field 2

:-)
Chuck

Quoted 21 lines · Jim Reimer
Quoted 9 lines · Chuck Gelm

Hi, Brian:

Thanks. Your suggestion is the similar to Jim's with
the arguments reversed.

You and Jim have fed me. Thanks.
Please teach me to fish. ;-)

See if you can get your hands on a copy of "Unix in a Nutshell" (System V edition) by O'Reilly. Doesn't always match up completely with Linux, but I've found it to be an invaluable reference - and it sure beats man pages.

Covers all the standard Unix commands, KSH, CSH, Bourne shell, and has sections on pattern matching, Emacs, vi, ex, sed, awk, make, and other stuff I've never used.

Quoted 6 lines

There's also "Linux in a Nutshell", but I've never seen a copy, and from looking at the table of contents on O'Reilly's web site, it looks light it may not cover commands the same way the Unix/Sys V book does.

-jdr-

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#17 lore raw

Re: string manipulating?

Quoted 6 lines · Chuck Gelm

Thanks, Jim & Brian:

[info|man cut]

LemmeC if I understand the '-f' fields=LIST

Quoted 9 lines

The LIST is a list of enumerated fields, i.e.
field1, field2, field3,... [ala: 1,2,3,4,5,6]
each separated by the delimiter. So, if "("
is a delimiter, then the following strings: v
Interesting ports on as1-216-68-15-180.fuse.net (216.68.15.180):
Interesting ports on as1-216-68-15-184.fuse.net (216.68.15.184):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
This is field 1 and this is field 2

exactly!

Quoted 30 lines

:-)
Chuck

Quoted 26 lines · Jim Reimer
Quoted 9 lines · Chuck Gelm

Hi, Brian:

Thanks. Your suggestion is the similar to Jim's with
the arguments reversed.

You and Jim have fed me. Thanks.
Please teach me to fish. ;-)

See if you can get your hands on a copy of "Unix in a Nutshell" (System V edition) by O'Reilly. Doesn't always match up completely with Linux, but I've found it to be an invaluable reference - and it sure beats man pages.

Covers all the standard Unix commands, KSH, CSH, Bourne shell, and has sections on pattern matching, Emacs, vi, ex, sed, awk, make, and other stuff I've never used.

There's also "Linux in a Nutshell", but I've never seen a copy, and from looking at the table of contents on O'Reilly's web site, it looks light it may not cover commands the same way the Unix/Sys V book does.

Quoted 6 lines
Quoted 1 line

-jdr-

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#18 lore raw

PC speaker 'alert'

In reply to [email protected]

Howdy, Y'all:

I'm monitoring my /var/log/messages file and I'd
like to have the PC's speaker beep when there is a new entry. I am monitoring 'DENY'ed packets. I am now using 'cut' and 'grep' and 'tail' to show the last 11 denied packets. How can I cause the PC speaker to beep when the last 11 lines are different the the previous 11 lines.

Here is what I am using now:

#!/bin/sh
#
grep DENY /var/log/messages > t
cut -f2 -d\= t > u
cut -f2 -d" " u > v
cut -f1 -d: v > w
tail -n 11 w > deny.txt
clear
echo ""
cat deny.txt
echo ""
chmod 777 deny.txt ; v
chgrp users deny.txt ; so that my other workstations can see

Regards, Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#19 lore raw

Re: PC speaker 'alert'

Quoted 10 lines · Chuck Gelm

Howdy, Y'all:

I'm monitoring my /var/log/messages file and I'd
like to have the PC's speaker beep when there is a new entry. I am monitoring 'DENY'ed packets. I am now using 'cut' and 'grep' and 'tail' to show the last 11 denied packets. How can I cause the PC speaker to beep when the last 11 lines are different the the previous 11 lines.

Quoted 8 lines

Here is what I am using now:

#!/bin/sh
#
grep DENY /var/log/messages > t
cut -f2 -d\= t > u
cut -f2 -d" " u > v
cut -f1 -d: v > w

tail -n 11 w | diff -- - deny.txt >/dev/null 2>&1 || echo -ne "\a"

Quoted 10 lines

tail -n 11 w > deny.txt
clear
echo ""
cat deny.txt
echo ""
chmod 777 deny.txt ; v
chgrp users deny.txt ; so that my other workstations can see

Regards, Chuck
-

Lawson

--
---oops---

________________________________________________________________
Sign Up for Juno Platinum Internet Access Today
Only $9.95 per month!
Visit www.juno.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs