Created
December 18, 2013 01:46
-
-
Save tygor/8016055 to your computer and use it in GitHub Desktop.
I like a clean file system. Especially when I publish folders to the web. I found this nice little trick to remove all Mac hidden files recursively. Put it in the parent folder and it will remove all .DS_Store and ._some-file-name.ext files.
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
#!/bin/bash | |
echo | |
echo Deleting all .DS_Store and ._* files that Mac puts all over your system | |
echo | |
find . -name ".DS_Store" -print0 | xargs -0 rm -rf | |
find . -name "._*" -print0 | xargs -0 rm -rf | |
echo | |
echo " _ _ _ ____ _ " | |
echo " / \ | | | | _ \ ___ _ __ ___| |" | |
echo " / _ \ | | | | | | |/ _ \| '_ \ / _ \ |" | |
echo " / ___ \| | | | |_| | (_) | | | | __/_|" | |
echo "/_/ \_\_|_| |____/ \___/|_| |_|\___(_)" | |
echo Back to you... | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment