Archived Forum Post

Index of archived forum posts

Question:

How to exclude a subdirectory from TAR?

Dec 03 '14 at 09:14

I am creating a tar archive of a very large directory that contains 1.4 million files, and is about 650GB. There's one directory that contains about 900k tiny little files I dont want in my archive. Is there some way to exclude that directory from the tar archive?

I see this functionality exists with the Chilkat zip library (SetExclusions()) but I need something similar with tar.


Answer

The new version (9.5.0.46) to be released very soon (within 1 week) includes new TAR properties named MustMatch and MustNotMatch that should make it possible to handle this situation. See the online reference documentation. It's been updated with information about the new functionality, and marked as being introduced in v9.5.0.46.