lundi 23 mars 2015

Prevent .AppleDouble folders on NFS shares


I've got at home:



  • a Debian server running multiple services, including NFS shares;

  • one Mac that I use most of the time

  • several Android devices

  • a Windows client


All happily access the files on the server, as read/write.


Now for some reason my Mac thinks it's smarter than every one else and puts all of his turds in every folder. I understand there's a value added when doing this on local HFS shares (or on the server's HFS TimeMachine partition). However when dealing in public (I mean on a server shared with foreign OSes), I think it should behave and keep it to the minimum.


The Mac is a laptop, but it is most of the time sitting on a desk with external keyboard/screen/mouse, which means it keeps the NFS shares mounted most of the time. Which is nice. Which means it keeps watching everything and puts his .AppleDouble turds everywhere as soon as they are deleted.



$ find . -type d -name .AppleDouble -exec rm -rf "{}" \;
$ find . -type d -name .AppleDouble|wc
0 0 0
...
$ find . -type d -name .AppleDouble|wc
1251 3109 38017
...
$ find . -type d -name .AppleDouble|wc
2810 9992 113386


This happened in less than one minute. So server side hacks such as read only or remove .AppleDouble with a cron script are just no go.


Is it possible to just tell the Mac to keep it shut when using shared spaces?





Aucun commentaire:

Enregistrer un commentaire