FreeNAS: .AppleDouble / .DS_Store delete

When you use a FreeNAS share with macOS, it creates different Finder metadata directories for each regular directory. To keep a backup to an external media as lean as possible, this data can be deleted, which is most easily done with a command at the Linux prompt:

find . -name ".Apple*" -type d -prune -exec rm -r {} +

This will delete all directories beginning with ".Apple". DS_Store" are files, so we have to modify the above command a bit:

find . -name ".DS_Store" -type f -prune -exec rm -r {} +

Under no circumstances try it with data before the backup.

My setup is structured in such a way that the data can only be accessed rsync to a Synology NAS and from there to an Amazon Drive. The Synology will also perform this cleanup on the Synology to minimize the number of files to transfer.

Leave a Reply

Your email address will not be published. Required fields are marked *