Search code examples
macososx-snow-leopard

Prventing .DS_Store from being created in my web projects


How can I prevent OSX .DS_Store files from being created in my PHP projects? It's so annoying and I have to manually delete them when I want to put my app online or compress it and send it.

Thanks.


Solution

  • Simple answer: you can't. But, why do you care? They don't hurt if you deploy them to the web server. Also you can make a script to delete them, especially if you make a script to zip/tar your distribution you can also let it either delete the files or tar/zip in a way ignoring them. Like tar cfX dist.tar ./.DS_Store * will tar all folders/files in the current directory but exclude (capital X switch) the .DS_Store file.