In article <8l3rme$prp$1@power25t.hkbu.edu.hk>, Pui Ming WONG 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 `-_-' 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