bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] --exclude and Include.


From: Ralph Corderoy
Subject: [Bug-tar] --exclude and Include.
Date: Sun, 19 Jun 2016 12:09:11 +0100

Hi,

tar 1.29-1 on Arch Linux.  `info tar exclude' says

   * The main operating mode of 'tar' does not act on a file name
     explicitly listed on the command line, if one of its file name
     components is excluded.  In the example above, if you create an
     archive and exclude files that end with '*.o', but explicitly name
     the file 'dir.o/foo' after all the options have been listed,
     'dir.o/foo' will be excluded from the archive.

(Should that first comma be deleted?)

--exclude is also listed in "Position-Sensitive Options".

In the simple case, I see this behaviour.

    $ find
    .
    ./foo
    ./foo/a
    ./foo/b
    ./c
    $
    $ tar -cvf /dev/null --exclude '?' .
    $ tar -cvf /dev/null --exclude '?' foo/b .
    $ tar -cvf /dev/null foo/b --exclude '?' .
    foo/b
    $

That seems OK in that b is excluded when it appears, implicitly
or explicitly, after --exclude but included when given before.  Does it
contradict that quoted paragraph above though?

In a more complex case with a -g incremental, I find that --exclude
'*.sqlite' and explicitly trying to get
/home/foo/.mozilla/firefox/rand.default/bar.sqlite included fails;  that
one file isn't tar'd.

What behaviour should I expect?  Is there a very verbose option that
describes for each inode why it is or isn't backed up, e.g. unchanged
since the last incremental, matched by rule --exclude '*.foo', etc?  I
already have --verbose and --warning=all.

--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy



reply via email to

[Prev in Thread] Current Thread [Next in Thread]