Exclude file using tar

0
643

When you want to exclude file where type is socket file,You should this commands.

find /etc -type s -print > $BASE_PATH/exclude.txt
tar -cvf $SCRIPTS_FOLDER/root.tar -X $BASE_PATH/exclude.txt /home/root /opt/scripts /etc

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.