tar with –include pattern

GNU tar has a -T or –files-from option that can take a file containing a list of files to include. The file specified with this option can be “-” for stdin. So, you can pass an arbitrary list of files for tar to archive from stdin using -files-from –. Using find patterns to generate a list of files, your example becomes:

find . -name '*.php' -print0 | tar -cvjf my.tar.bz2 --null --files-from -

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)