Created
January 21, 2022 23:35
-
-
Save foxweb/591bdd628e8c6dfff8eb09409d763b0c to your computer and use it in GitHub Desktop.
Removing extra files (hidden files from macOS) and files/dirs permissions fix.
This file contains hidden or 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/sh | |
sudo chown -R foxweb:foxweb ./* | |
find . -name "*" -type d -print0 | xargs -0 /bin/chmod 755 | |
find . -name "*" -type f -print0 | xargs -0 /bin/chmod 644 | |
find . -name ".DS_Store" -type f -print0 | xargs -0 /bin/rm | |
find . -name "._*" -type f -print0 | xargs -0 /bin/rm | |
find . -name ".AppleDouble" -type d -print0 | xargs -0 /bin/rm -rf | |
find . -name ".AppleDB" -type d -print0 | xargs -0 /bin/rm -rf | |
find . -name ".AppleDesktop" -type d -print0 | xargs -0 /bin/rm -rf | |
find . -name ".TemporaryItems" -type d -print0 | xargs -0 /bin/rm -rf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment