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

Re: excluding /*/ and /**/

>* matches with / as well.  So that will exclude any filename beginning with:
>    /tmp/zzz/
>and ending in:
>                 /empty.file
>> ummm. no. the tmp/zzz/?/???/empty.file (s) should be there?  
>Unfortunately not.  As noted in http://www.tarsnap.com/selecting-files.html
>the behaviour of --include and --exclude comes from BSD tar.  For example,
>    "In particular, 'a*b' will match 'foo/a1111/222b/bar"
>    https://github.com/libarchive/libarchive/blob/master/libarchive/archive_match.c#L749

both of those links are useful and explain all.

>I personally find include & exclude rather confusing.  Would the nodump flag
>work in your case?

not reliably.
chattr +d /home/(user)/.cache
would be fine until a user needed more space and rm -r ~/.cache and killed the flag.

i run tarsnap from a script so i could just add a section at the top to
generate an exclude on the fly.

of course, /*/ and /**/ like zsh and newer bash would be kinda nice though.

also, wikipedia lied to me. (below the first table)