* tar for "full" floppy backup?
@ 2002-12-08 18:38 Jerry James Haumberger
2002-12-09 8:10 ` ichi
0 siblings, 1 reply; 19+ messages in thread
From: Jerry James Haumberger @ 2002-12-08 18:38 UTC (permalink / raw)
To: linux-newbie
>> One of these commands..
>>
>> # man tar
>> # info tar
>> # tar --help
>>
>>..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.
>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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: tar for "full" floppy backup?
2002-12-09 8:10 ` ichi
@ 2002-12-08 21:07 ` dashielljt
2002-12-09 18:11 ` ichi
2003-01-04 17:50 ` pcmcia-cs quit working Chuck Gelm
` (2 subsequent siblings)
3 siblings, 1 reply; 19+ messages in thread
From: dashielljt @ 2002-12-08 21:07 UTC (permalink / raw)
To: ichi; +Cc: Jerry James Haumberger, linux-newbie
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: tar for "full" floppy backup?
2002-12-08 18:38 tar for "full" floppy backup? Jerry James Haumberger
@ 2002-12-09 8:10 ` ichi
2002-12-08 21:07 ` dashielljt
` (3 more replies)
0 siblings, 4 replies; 19+ messages in thread
From: ichi @ 2002-12-09 8:10 UTC (permalink / raw)
To: Jerry James Haumberger; +Cc: linux-newbie
Jerry James Haumberger wrote:
>
> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: tar for "full" floppy backup?
2002-12-09 18:11 ` ichi
@ 2002-12-09 10:16 ` dashielljt
2002-12-09 12:38 ` Mr. James W. Laferriere
1 sibling, 0 replies; 19+ messages in thread
From: dashielljt @ 2002-12-09 10:16 UTC (permalink / raw)
To: ichi; +Cc: linux-newbie
You're not asking any developer of tar that question, and I haven't
studied the program's source code so can't answer your questionn.
Jude <dashielljt(at)gmpexpress-dot-net>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: tar for "full" floppy backup?
2002-12-09 18:11 ` ichi
2002-12-09 10:16 ` dashielljt
@ 2002-12-09 12:38 ` Mr. James W. Laferriere
1 sibling, 0 replies; 19+ messages in thread
From: Mr. James W. Laferriere @ 2002-12-09 12:38 UTC (permalink / raw)
To: ichi; +Cc: dashielljt, linux-newbie
Hello Gents , One word , df . Hth , JimL
On Mon, 9 Dec 2002 ichi@ihug.co.nz wrote:
> dashielljt wrote:
> > 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
--
+------------------------------------------------------------------+
| James W. Laferriere | System Techniques | Give me VMS |
| Network Engineer | P.O. Box 854 | Give me Linux |
| babydr@baby-dragons.com | Coudersport PA 16915 | only on AXP |
+------------------------------------------------------------------+
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: tar for "full" floppy backup?
2002-12-08 21:07 ` dashielljt
@ 2002-12-09 18:11 ` ichi
2002-12-09 10:16 ` dashielljt
2002-12-09 12:38 ` Mr. James W. Laferriere
0 siblings, 2 replies; 19+ messages in thread
From: ichi @ 2002-12-09 18:11 UTC (permalink / raw)
To: dashielljt; +Cc: linux-newbie
dashielljt wrote:
>
> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* pcmcia-cs quit working
2002-12-09 8:10 ` ichi
2002-12-08 21:07 ` dashielljt
@ 2003-01-04 17:50 ` Chuck Gelm
2003-01-05 16:46 ` string manipulating? Chuck Gelm
2003-02-19 22:56 ` PC speaker 'alert' Chuck Gelm
3 siblings, 0 replies; 19+ messages in thread
From: Chuck Gelm @ 2003-01-04 17:50 UTC (permalink / raw)
To: linux-newbie
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* string manipulating?
2002-12-09 8:10 ` ichi
2002-12-08 21:07 ` dashielljt
2003-01-04 17:50 ` pcmcia-cs quit working Chuck Gelm
@ 2003-01-05 16:46 ` Chuck Gelm
2003-01-05 17:01 ` Jim Reimer
2003-01-05 17:20 ` Brian Jackson
2003-02-19 22:56 ` PC speaker 'alert' Chuck Gelm
3 siblings, 2 replies; 19+ messages in thread
From: Chuck Gelm @ 2003-01-05 16:46 UTC (permalink / raw)
To: linux-newbie
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: string manipulating?
2003-01-05 16:46 ` string manipulating? Chuck Gelm
@ 2003-01-05 17:01 ` Jim Reimer
2003-01-05 17:42 ` Chuck Gelm
2003-01-05 17:20 ` Brian Jackson
1 sibling, 1 reply; 19+ messages in thread
From: Jim Reimer @ 2003-01-05 17:01 UTC (permalink / raw)
To: Chuck Gelm; +Cc: linux-newbie
how 'bout
cut -d\( -f2
-jdr-
Chuck Gelm wrote:
>
> 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 majordomo@vger.kernel.org
> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: string manipulating?
2003-01-05 16:46 ` string manipulating? Chuck Gelm
2003-01-05 17:01 ` Jim Reimer
@ 2003-01-05 17:20 ` Brian Jackson
2003-01-05 17:23 ` Brian Jackson
1 sibling, 1 reply; 19+ messages in thread
From: Brian Jackson @ 2003-01-05 17:20 UTC (permalink / raw)
To: Chuck Gelm; +Cc: linux-newbie
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
Chuck Gelm writes:
> 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 majordomo@vger.kernel.org
> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: string manipulating?
2003-01-05 17:20 ` Brian Jackson
@ 2003-01-05 17:23 ` Brian Jackson
2003-01-06 0:50 ` Chuck Gelm
0 siblings, 1 reply; 19+ messages in thread
From: Brian Jackson @ 2003-01-05 17:23 UTC (permalink / raw)
To: Chuck Gelm; +Cc: linux-newbie
Oops. I meant:
grep $your_options | cut -f2 -d\( | cut -f1 -d\)
Brian Jackson writes:
> 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
>
> Chuck Gelm writes:
>
>> 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 majordomo@vger.kernel.org
>> 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 majordomo@vger.kernel.org
> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: string manipulating?
2003-01-05 17:01 ` Jim Reimer
@ 2003-01-05 17:42 ` Chuck Gelm
2003-01-05 17:56 ` Jim Reimer
0 siblings, 1 reply; 19+ messages in thread
From: Chuck Gelm @ 2003-01-05 17:42 UTC (permalink / raw)
To: Jim Reimer; +Cc: linux-newbie
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
Jim Reimer wrote:
>
> how 'bout
>
> cut -d\( -f2
>
> -jdr-
>
> Chuck Gelm wrote:
> >
> > 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 majordomo@vger.kernel.org
> > 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: string manipulating?
2003-01-05 17:42 ` Chuck Gelm
@ 2003-01-05 17:56 ` Jim Reimer
0 siblings, 0 replies; 19+ messages in thread
From: Jim Reimer @ 2003-01-05 17:56 UTC (permalink / raw)
To: Chuck Gelm; +Cc: linux-newbie
Chuck Gelm wrote:
>
> 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(
>
> '-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.
>
> chuck
>
73,
-jdr-
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: string manipulating?
2003-01-05 17:23 ` Brian Jackson
@ 2003-01-06 0:50 ` Chuck Gelm
2003-01-06 1:22 ` Brian Jackson
[not found] ` <3E19A91A.7EEB7666@wa5rrh.org>
0 siblings, 2 replies; 19+ messages in thread
From: Chuck Gelm @ 2003-01-06 0:50 UTC (permalink / raw)
To: Brian Jackson; +Cc: linux-newbie
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
Brian Jackson wrote:
>
> Oops. I meant:
>
> grep $your_options | cut -f2 -d\( | cut -f1 -d\)
>
> Brian Jackson writes:
>
> > 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
> >
> > Chuck Gelm writes:
> >
> >> 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 majordomo@vger.kernel.org
> >> 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 majordomo@vger.kernel.org
> > 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: string manipulating?
2003-01-06 0:50 ` Chuck Gelm
@ 2003-01-06 1:22 ` Brian Jackson
[not found] ` <3E19A91A.7EEB7666@wa5rrh.org>
1 sibling, 0 replies; 19+ messages in thread
From: Brian Jackson @ 2003-01-06 1:22 UTC (permalink / raw)
To: Chuck Gelm; +Cc: linux-newbie
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
Chuck Gelm writes:
> 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
>
>
> Brian Jackson wrote:
>>
>> Oops. I meant:
>>
>> grep $your_options | cut -f2 -d\( | cut -f1 -d\)
>>
>> Brian Jackson writes:
>>
>> > 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
>> >
>> > Chuck Gelm writes:
>> >
>> >> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: string manipulating?
[not found] ` <3E19A91A.7EEB7666@wa5rrh.org>
@ 2003-01-06 22:09 ` Chuck Gelm
2003-01-06 23:06 ` Brian Jackson
0 siblings, 1 reply; 19+ messages in thread
From: Chuck Gelm @ 2003-01-06 22:09 UTC (permalink / raw)
To: linux-newbie
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
Jim Reimer wrote:
>
> Chuck Gelm wrote:
> >
> > 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.
>
> -jdr-
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: string manipulating?
2003-01-06 22:09 ` Chuck Gelm
@ 2003-01-06 23:06 ` Brian Jackson
0 siblings, 0 replies; 19+ messages in thread
From: Brian Jackson @ 2003-01-06 23:06 UTC (permalink / raw)
To: Chuck Gelm; +Cc: linux-newbie
Chuck Gelm writes:
> 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
>
exactly!
> :-)
> Chuck
>
> Jim Reimer wrote:
>>
>> Chuck Gelm wrote:
>> >
>> > 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.
>>
>> -jdr-
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* PC speaker 'alert'
2002-12-09 8:10 ` ichi
` (2 preceding siblings ...)
2003-01-05 16:46 ` string manipulating? Chuck Gelm
@ 2003-02-19 22:56 ` Chuck Gelm
2003-02-20 2:33 ` whitnl73
3 siblings, 1 reply; 19+ messages in thread
From: Chuck Gelm @ 2003-02-19 22:56 UTC (permalink / raw)
To: linux-newbie
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: PC speaker 'alert'
2003-02-19 22:56 ` PC speaker 'alert' Chuck Gelm
@ 2003-02-20 2:33 ` whitnl73
0 siblings, 0 replies; 19+ messages in thread
From: whitnl73 @ 2003-02-20 2:33 UTC (permalink / raw)
To: nc8q; +Cc: linux-newbie
On Wed, 19 Feb 2003, Chuck Gelm wrote:
> 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 | diff -- - deny.txt >/dev/null 2>&1 || echo -ne "\a"
> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2003-02-20 2:33 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-08 18:38 tar for "full" floppy backup? Jerry James Haumberger
2002-12-09 8:10 ` ichi
2002-12-08 21:07 ` dashielljt
2002-12-09 18:11 ` ichi
2002-12-09 10:16 ` dashielljt
2002-12-09 12:38 ` Mr. James W. Laferriere
2003-01-04 17:50 ` pcmcia-cs quit working Chuck Gelm
2003-01-05 16:46 ` string manipulating? Chuck Gelm
2003-01-05 17:01 ` Jim Reimer
2003-01-05 17:42 ` Chuck Gelm
2003-01-05 17:56 ` Jim Reimer
2003-01-05 17:20 ` Brian Jackson
2003-01-05 17:23 ` Brian Jackson
2003-01-06 0:50 ` Chuck Gelm
2003-01-06 1:22 ` Brian Jackson
[not found] ` <3E19A91A.7EEB7666@wa5rrh.org>
2003-01-06 22:09 ` Chuck Gelm
2003-01-06 23:06 ` Brian Jackson
2003-02-19 22:56 ` PC speaker 'alert' Chuck Gelm
2003-02-20 2:33 ` whitnl73
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox