On Tuesday, 5 September 2023 23:32:04 BST Walter Dnes wrote: > On Tue, Sep 05, 2023 at 07:38:54PM +0100, Michael wrote > > > Have a look at this page which explains what you need to do: > > > > https://bford.info/cachedir/ > > Thank you! Thank you! Thank you! That page explains that any random > CACHEDIR.TAG file won't suffice, and why my attempts were all failing. > > This file must be an ordinary file, not for example a symbolic link. > Additionally, the first 43 octets of this file *MUST* *MUST* *MUST* > consist of the following ASCII header string: > > Signature: 8a477f597d28d172789f06886806bc55 > > Otherwise it wil *NOT* work. This *NOT* mentioned in "man tar". > https://www.gnu.org/software/tar/manual/tar.html#index-cachedir mentions > http://www.brynosaurus.com/cachedir/spec.html in passing, which > redirects to https://bford.info/cachedir/
IKR, it's as if the usage of this mechanism is meant to remain secret and a test of the patience and detective skills of the user. This is why I suggested using --exclude=".cache/*" which works the same way - as long as the cache directory you want to exclude is named ".cache". The use of a CACHEDIR.TAG file works for any directory you want to exclude from the backup, no matter what it is named. If you have a lot of directories you always want to exclude, then adding the CACHEDIR.TAG file in each of them is a one time action. Better than having to type all the exclude directives in the CLI invocation of tar. On the other hand, using --exclude=".cache/*" will catch any and all ".cache" directories, wherever they happen to be in the tree.
signature.asc
Description: This is a digitally signed message part.