Hexodus
6/22/2014 - 1:24 PM

This shows how to tar the current directory except the unwanted subdirectory files.

This shows how to tar the current directory except the unwanted subdirectory files.


tar cvpzf backup.tgz --exclude='dir_to_exculde/*' *

tar cvpzf backup.tgz --exclude='dir_to_exculde/*' 
--exclude='dir_to_exculde' *

//The last asteric means that the current dir is used. Keep in mind that files with a dot aren't included. 

//The secound example excludes also the directory from being included otherwise it would be included as empty one...