Re: why wont tar exclude



On Sun, 29 Jan 2006 14:19:26 -0800, Eric wrote:
> cd /
> tar -cvzf /tmp/home_dirs.tar.gz home --exclude home/a_user
>
> Why does this fail to exclude home/a_user?
> Its drivng me nuts! I've tried a pattern file, quotes, wildcards etc etc
> and i simply cant make the f**g thing exclude paths
> Its probably some simple thing

I usually find using the syntax given in the man page helps

SYNOPSIS
tar [OPTION...] [FILE]...

--exclude=PATTERN
exclude files, given as a PATTERN

This worked for me
cd /
tar -cvzf /tmp/home_dirs.tar.gz --exclude=home/bittwister home
.



Relevant Pages

  • Re: Sophisticated(!) copying in DOS
    ... I didn't realize EXCLUDE MUST ... And the quotes were quotes meaning, "Hey, everything between the quotes is ... what I typed for a command". ... > - You quote a .bmp file after the exclude switch. ...
    (microsoft.public.windowsxp.general)
  • Re: How do I create an expresion to exclude two items or NOT EQUAL to.
    ... You just set up your criteria ... to exclude them: ... If the items are numeric data types remove the quotes. ...
    (microsoft.public.access.queries)
  • Re: why wont tar exclude
    ... I've tried a pattern file, quotes, wildcards etc etc ... >and i simply cant make the f**g thing exclude paths ... site-wide spam filters at catherders.com. ...
    (alt.os.linux)
  • Re: is apache 2.2.11 certified by Red Hat?
    ... List of packages to exclude from updates or installs. ... Shell globs using wildcards ...
    (RedHat)
  • Re: Regular expression help
    ... files referenced, looking for included files, images, etc. ... Now what I need to do and can't figure out is how to exclude certain ... 'myincludefiles' or 'http' inside the quotes. ... -William James ...
    (microsoft.public.scripting.vbscript)