Created
June 11, 2020 01:03
-
-
Save ckunte/df328ca09ab40ef556c08faf59a6b1b6 to your computer and use it in GitHub Desktop.
Getting rid of these pesky per-folder-setting files (.DS_Store)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo find / -depth -name ".DS_Store" -exec rm {} \; | |
# | |
# Run these periodically via a cronjob. Type `sudo crontab -e` in | |
# a Terminal and enter the following job. | |
# | |
# 0 9 * * * root find / -name ".DS_Store" -depth -exec rm {} \; | |
# | |
# What this job does: | |
# At 9AM everyday (in the example below), root looks for .DS_Store | |
# files in all attached volumes and removes them. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment