Recursively Remove .DS_Store
- Select Applications > Utilities to launch Terminal.
- In the command line,
cd to/your/directory - Finally, in the command line, type:
find . -name '.DS_Store' -type f -delete. Press enter.
Automatically remove DS_Store files periodically
Select Applications > Utilities to launch Terminal.
Enter the following UNIX command:
sudo crontab -e
When prompted for a password, enter your Mac OS X Administrator password.
In the vi editor, press the letter I on your keyboard once and enter the following command:
15 1 * * * root find / -name ".DS_Store" -depth -exec rm {} \;
This crontab entry has the following format:
<Minute> <Hour> <DayOfMonth> <Month> <DayOfWeek> <User Command>.
The system automatically runs the command at 1:15 AM everyday. To configure the command for a different time, use different values.

0 Comments