Cache Directory Tagging Specification (2004)
bford.info
bford.info
There’s also 18 hits on Stackoverflow.
[1] Via the link from another comment https://github.com/RsyncProject/rsync/issues/499
https://borgbackup.readthedocs.io/en/stable/usage/create.htm...
https://restic.readthedocs.io/en/stable/040_backup.html#excl...
> Case is important in the header signature, there can be no whitespace or other characters in the file before the 'S',
Much as I dislike BOM... maybe a BOM could be permitted with “a run of Unicode whitespace is permitted before the `S`”.
> The hex value in the signature happens to be the MD5 hash of the string ".IsCacheDirectory". This signature header is required to avoid the chance of an unrelated file named CACHEDIR.TAG being mistakenly interpreted as a cache directory tag by data management utilities, and (for example) causing valuable data not to be backed up.
Nice use of a “magic string” for the format. But (for extra magic) could have just picked a UUID. Just any random one.
(Plus "a run of Unicode whitespace" is a very heavy-weight thing, as it requires full Unicode database and Unicode parsers. It is pretty likely that apps which might care about cachedir tag will not have this linked in by default.)