If you come across a file by the name of .DS_Store, it probably originated on a Mac. OS X uses this type of file to store additional information about files, directories, and their contents, such as the color of a label, the dimensions of a Finder window, or the sorting order of items in a folder. Unfortunately, .DS_Store files routinely cause problems on other systems such as when you try to copy data across your local network or upload a website to a server. Given that you don’t need these files on a web server and can’t use them on a Windows system, there is no reason why you should let them ruin the day. Using this terminal command:
find . -name '*.DS_Store' -type f -delete
you can easily get rid of all the .DS_Store files in an entire directory tree.