[HN Gopher] Cache Directory Tagging Specification (2004)
       ___________________________________________________________________
        
       Cache Directory Tagging Specification (2004)
        
       Author : networked
       Score  : 16 points
       Date   : 2024-11-09 09:59 UTC (13 hours ago)
        
 (HTM) web link (bford.info)
 (TXT) w3m dump (bford.info)
        
       | Cyphase wrote:
       | I think this is my favorite lesser known spec, for whatever
       | reason. I smile whenever I run across a CACHEDIR.TAG.
        
         | chubot wrote:
         | Which apps use it?
        
           | keybored wrote:
           | GNU tar has `--exclude-caches-all` which uses it. Also
           | apparently some tool named "dar".[1]
           | 
           | There's also 18 hits on Stackoverflow.
           | 
           | [1] Via the link from another comment
           | https://github.com/RsyncProject/rsync/issues/499
        
           | networked wrote:
           | BorgBackup and restic have the CLI option `--exclude-caches`.
           | 
           | https://borgbackup.readthedocs.io/en/stable/usage/create.htm.
           | ..
           | 
           | https://restic.readthedocs.io/en/stable/040_backup.html#excl.
           | ..
        
       | Rygian wrote:
       | Support in rsync seems to be lacking, unfortunately:
       | https://github.com/RsyncProject/rsync/issues/499
        
       | keybored wrote:
       | Good idea.
       | 
       | > 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.
        
       ___________________________________________________________________
       (page generated 2024-11-09 23:01 UTC)