1- Open up Terminal
2- In the command line, cd to/your/directory
3- Finally, in the command line, type: find . -name '.DS_Store' -type f -delete
. Press enter.
Warning: Never use a wildcard (*) with this command, unless you know what you're doing. Bad things can happen if you don't.
This snippet will remove .DS_Store files from the selected folder, as well as all of the folders that it contains. All of them. At once.
This command can be used for other types of files, as well. Just replace '.DS_Store' with whatever file name, or type, that you want to delete.