View Single Post
Old 12-04-2004, 06:26 AM   #2 (permalink)
greffov
Da House Nerd
 
greffov's Avatar
 
Join Date: Dec 1969
Location: One CPU Lane
Posts: 3,512
greffov will become famous soon enough
tar itself can't do it, but I would do it using find. Find can handle regexps.

see man find especially the OPERATORS section.

one example from the manual:
find / \! -name "*.c" -print
Print out a list of all the files whose names do not end in .c.

in complete the command would be something like
tar -cvzf myfile.tar.gz `find . -name "bla" | xargs`

for a backup it might be interesting to use the -j flag instead of the -z flag, since bzip2 compression is much better than gzip compression.
__________________
Linux virusscanner detected a virus:
Windows 95 ... delete [Y/n] y
~
~

:wq
greffov is offline   Reply With Quote