It's a bit long winded, but here's a possibility: # cd / # tar zcpvf siteXX.tgz /share/* /siteX/* <output omitted> # tar ztf siteXX.tgz | grep '^/share' | xargs rm -f
Though I'm not entirely sure what you mean by "on a per site basis" in this context, can you elaborate please, especially if the above solution is not what you need. On Fri, Nov 18, 2016 at 10:20 AM, BSD <b...@cpscoatings.net> wrote: > Does misc@ have an alternative method for "gtar --delete"? > > I'm making siteXX.tgz's for multiple sites. There is a directory that > is shared between all sites. Then, each site may have a directory of > files to append to the archive. > > I'd also like to be able to remove files from the yet to be zipped > archive that come from the shared directory on a per site basis. Just > looking to stay within base if possible. > > Example files: > /share/etc/pf.conf > /share/etc/vi.exrc > /share/usr/X11R6/lib/X11/fonts/TTF/Collection/... > /site1/append/install.conf > /site1/omit/X11R6/lib/X11/fonts/TTF/Collection/... > > Any advise in my methods or scheme in general would be appreciated! > > All the best, > > Keith Larsen > CPS Coatings > -- Aaron Mason - Programmer, open source addict I've taken my software vows - for beta or for worse