Date: Wed, 19 May 2010 10:50:38 -0500 From: Martin McCormick <martin@dc.cis.okstate.edu> To: freebsd-questions@freebsd.org Subject: tar and --include Message-ID: <201005191550.o4JFocl7064558@dc.cis.okstate.edu>
next in thread | raw e-mail | index | archive | help
A few days ago, I asked about the --include directive in tar after things didn't quite work the way the man page seemed to indicate. One might get the impression that if --include or --include='*pattern*' was added to a tar command, tar would only archive what was in the pattern and not archive everything as its default operation. What I discovered was that --include doesn't appear to do anything at all. The example in the man page shows using it to filter an existing archive and make a tar file of what was in the existing archive that also matched the pattern. I never tried that since that is not what was needed here. What turned out to work very well was to use the feature in tar that lets one exclude a whole list of patterns in a designated file. You just put in what shouldn't be in the archive and it appeared to work fine. The --include directive only seems to exist in the FreeBSD form of tar. I tried a Linux system's tar man page and it is not there but both support the -X path/filename for a list of exclusion patterns. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005191550.o4JFocl7064558>