Created
July 23, 2020 23:44
-
-
Save dgentry/90f6c4389ea7ea0b1007f07dc7136882 to your computer and use it in GitHub Desktop.
Recursively remove all weird Apple filesystem flags, xattrs, and ACLs that would keep you from deleting your 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 | |
# Take care to run only from the directory you want to delete, not the parent | |
find -L . -flags +uchg -exec chflags -h nouchg {} \; | |
find -L . -flags +schg -exec chflags -h noschg {} \; | |
chmod -RN . | |
find . -type l -exec chmod -h -N {} \; | |
xattr -rcs . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment