Excluding some files in present directory to while creating tar

In Below Example Excluding zip files in a particular directory

find . -name '*.zip*' > exclude

sed -e 's/.\///' exclude > exclude1

tar -cvfX xyz.tar exclude1 *

 

exclude

fil1.zip

fil2.zip

Leave a Reply

Your email address will not be published.