Exclude directory and files in tar

First create text file which include all the directories and files which needed to exclude from tar. Here we are creating exclude file.

#vi exclude   

Execute below command to make tar which will exclude the files and directory which is available in exclude file.

# tar -cvfX test.tar ./exclude *

No comments:

Post a Comment