Can tar accept an "include file" (as opposed to an include pattern)?
Hi all,
I know tar has the --include option and, on some systems, the --from-file= option. I'm using OS X, which doesn't have the --from-file option. I'm also aware of the -X option.
E.g. when using -X, I have /tmp/exclude.txt that contains the following:
~/Documents
~/Downloads
(etc). Running tar on ~ with -X works perfectly as ~/Documents and ~/Downloads are excluded.
I'm looking for the inclusion equivalent of -X but can't seem to find anything in the man pages or GNU site. This is because I'd like to have a list of paths (not filenames) that are included in a tar command.
Does tar have that or do I need to create the include, manually cat/sed the contents and pass each path to the tar command?
Thanks!
Last edited by digitalformula; 01-24-2013 at 04:52 AM.
Reason: Added additional info
|