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