LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to tar file with exclude a directory (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-tar-file-with-exclude-a-directory-792757/)

elainelaw 03-02-2010 09:39 PM

how to tar file with exclude a directory
 
[ --exclude FILE ] [ -X, --exclude-from FILE


I tar to tar some directory and exclude a directory , I tried tar -cvf /tmp/test.gz ./* --exclude ./temp but not work , and the parameter --exclude seems exclude file only not directory , can advise what can i do ? thx

evo2 03-02-2010 10:15 PM

Notice that the man page specifies that the argument to --exclude is a "PATTERN" not at path.

So what happens if you use '--exclude temp' instead of '--exclude ./temp'?

Evo2.


All times are GMT -5. The time now is 09:34 AM.