Hi,
How do I tar a list of files and folders (all in the same directory) with the exclusion of a single directory (which contains a huge amount of data)
Hi,
How do I tar a list of files and folders (all in the same directory) with the exclusion of a single directory (which contains a huge amount of data)
tar --exclude=PATTERN xvzf nameof.tar.gz ./*
PATTERN can be the directory name. GNU tar.
I think it may depend on your version of tar. You can use 'man tar' or 'tar --help' to check for details on your version. But the options I found are:
tar -X filename: excludes anything listed in the given text file
tar --exclude=pattern: excludes anything matching the pattern
Hey thanks for the superfast response!
1 quick question though - do I need to add the individual files/folders to this command that I want tar'd or can I do something like "tar --exclude=MYEXCLUDEDDIRECTORY xvzf mydirectoryiwant.tar.gz ./mydirectoryiwant/