Skip to main content
Scrapbook
  • Computer
    • Linux
    • Mac OS X
    • Windows
    • Miscellaneous
  • Research
  • Archive
  • Tags
  • RSS feed

    Tar select files in a directory tree

     author

    2013-03-12 21:46

    0 Comments

    find . -name 'test.*' | tar czvf test.tar.gz -T -
    find . -name test.\* -print0 | xargs -0 tar czvf test.tar.gz
    find . -name "test.*" -exec tar -rvf test.tar '{}' \;
    # find . -name "test.*" -exec tar -cvf test.tar '{}' \; +  # not tested
    find . -name "test.*" | cpio -o -H ustar | gzip -c > test.tar.gz
    
    • backup
    • linux
    • Previous post
    • Next post

    Comments