Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* using find command to select files to backup
@ 2000-07-19  4:00 Pui Ming WONG
  2000-07-19  4:00 ` Peter da Silva
  2000-07-26  4:00 ` steven bell
  0 siblings, 2 replies; 5+ messages in thread
From: Pui Ming WONG @ 2000-07-19  4:00 UTC (permalink / raw)


I would like to  backup files whose name meeting certain criteria
 onto 1 tar file from the /var/spool/mail
directory using the piping feature in unix command.
I've tried commands like:
cd /var/spool/mail
find . -name "[a-z][0-9]*" -print | tar cvf /somedir/somefile.tar -
find . -name "[a-z][0-9]*" | tar cvf /somedir/somefile.tar -
But they didn't seem to work 
What should be the command be ?
The OS is DG Unix 4.0E

--



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: using find command to select files to backup
  2000-07-19  4:00 using find command to select files to backup Pui Ming WONG
@ 2000-07-19  4:00 ` Peter da Silva
  2000-07-20  4:00   ` P.M.Wong 
  2000-07-26  4:00 ` steven bell
  1 sibling, 1 reply; 5+ messages in thread
From: Peter da Silva @ 2000-07-19  4:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1432 bytes --]

In article <8l3rme$prp$1@power25t.hkbu.edu.hk>,
Pui Ming WONG <s11976@net2.hkbu.edu.hk> wrote:
> I would like to  backup files whose name meeting certain criteria
>  onto 1 tar file from the /var/spool/mail
> directory using the piping feature in unix command.
> I've tried commands like:
> cd /var/spool/mail
> find . -name "[a-z][0-9]*" -print | tar cvf /somedir/somefile.tar -
> find . -name "[a-z][0-9]*" | tar cvf /somedir/somefile.tar -
> But they didn't seem to work 
> What should be the command be ?
> The OS is DG Unix 4.0E

If you do a "man tar" on Tru64 UNIX 4.0E, you get this snippet:

  R   [Compaq]  The named file immediately following this option contains a
      list of file names separated by newlines.  This list is added to (c
      function key, r function key) or extracted from (x function key) the
      archive.  The -R option is incompatible with the -C option.

Try "tar -c -v -f /somedir/somefile.tar -R -". I don't know if -R accepts
stdin like that, if not you can use multiple steps:

find . -name "[a-z][0-9]*" > /tmp/fn$$ && 
	tar  -c -v -f /somedir/somefile.tar -R /tmp/fn$$ &&
	rm -f /tmp/fn$$

(sh, in csh you need to add \ after the &&)

-- 
In hoc signo hack, Peter da Silva <peter@abbnm.com>
 `-_-'   Ar rug t� barr�g ar do mhact�re inniu? 
  'U`    "Hint for long-term survival: be tasty, and farmable." -- Tanuki
         "And that's the real message of 'The Matrix'." -- Abigail



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: using find command to select files to backup
  2000-07-19  4:00 ` Peter da Silva
@ 2000-07-20  4:00   ` P.M.Wong 
  0 siblings, 0 replies; 5+ messages in thread
From: P.M.Wong  @ 2000-07-20  4:00 UTC (permalink / raw)


Peter da Silva (peter@nmti.com) wrote:
: find . -name "[a-z][0-9]*" > /tmp/fn$$ && 
: 	tar  -c -v -f /somedir/somefile.tar -R /tmp/fn$$ &&
: 	rm -f /tmp/fn$$

: (sh, in csh you need to add \ after the &&)
i've tried it.
Only the mulitple commands which i placed in a shell script
works. Not the former method you stated
Thanks anyway




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: using find command to select files to backup
  2000-07-19  4:00 using find command to select files to backup Pui Ming WONG
  2000-07-19  4:00 ` Peter da Silva
@ 2000-07-26  4:00 ` steven bell
  2000-07-28  4:00   ` Mike Mohr
  1 sibling, 1 reply; 5+ messages in thread
From: steven bell @ 2000-07-26  4:00 UTC (permalink / raw)


Did you say DG unix? ie Data General?

Ive read this group's last few weeks postings and thought I was the only guy
running DGUX

steven

glad to have an ally.

Pui Ming WONG <s11976@net2.hkbu.edu.hk> wrote in message
news:8l3rme$prp$1@power25t.hkbu.edu.hk...
> I would like to  backup files whose name meeting certain criteria
>  onto 1 tar file from the /var/spool/mail
> directory using the piping feature in unix command.
> I've tried commands like:
> cd /var/spool/mail
> find . -name "[a-z][0-9]*" -print | tar cvf /somedir/somefile.tar -
> find . -name "[a-z][0-9]*" | tar cvf /somedir/somefile.tar -
> But they didn't seem to work
> What should be the command be ?
> The OS is DG Unix 4.0E
>
> --





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: using find command to select files to backup
  2000-07-26  4:00 ` steven bell
@ 2000-07-28  4:00   ` Mike Mohr
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Mohr @ 2000-07-28  4:00 UTC (permalink / raw)


steven bell wrote:

> Did you say DG unix? ie Data General?
>
> Ive read this group's last few weeks postings and thought I was the only guy
> running DGUX
>
> steven
>
> glad to have an ally.
>
> Pui Ming WONG <s11976@net2.hkbu.edu.hk> wrote in message
> news:8l3rme$prp$1@power25t.hkbu.edu.hk...
> > The OS is DG Unix 4.0E
> >
> > --

Last time I checked, DG didn't have 4.0E as a version designator.  4.12MU04 or
4.20MU02 I might believe.  I think he meant DigitalUX 4.0E or its new designator
Tru64 4.0E.  In case you haven't guessed, Steve, you're not alone.
================================================================
Mike Mohr, Systems Administrator  === Email: Mike.Mohr@aut.ac.nz
Information Technology Group      === Phone: 64 9 307-9999 x8133
Auckland University of Technology === Fax:   64 9 307-9901
PO Box 92006, Auckland, New Zealand =
http://home.aut.ac.nz/staff/mmohr/
================================================================
If we have unlimited ability to think, why do we use computers?





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-07-28  4:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-07-19  4:00 using find command to select files to backup Pui Ming WONG
2000-07-19  4:00 ` Peter da Silva
2000-07-20  4:00   ` P.M.Wong 
2000-07-26  4:00 ` steven bell
2000-07-28  4:00   ` Mike Mohr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox