User Tools

Site Tools


tips:linux:findtar

How to find and tar files?

Use the following to find/tar files (not binaries):

 find /full/path/to/search -type f | xargs tar cfvz archive.tgz
 

If you don't want to find/tar files in sub-directories, use:

 find /full/path/to/search -type f -maxdepth 1 | xargs tar cfvz archive.tgz
 

If you're looking for specific file names, use:

 find /full/path/to/search -name "<pattern>" | xargs tar cfvz archive.tgz
tips/linux/findtar.txt · Last modified: 2012/06/02 22:35 by erik