Change ownership of all apps in Applications folder to current user
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
find /Applications -name "*.app" -user old-user -maxdepth 1 | tr \\n \\0 | xargs -0 sudo chown -R $USER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
tr \\n \\0 | xargs -0
part is to avoid recognizing spaces as command terminators. It replaces new line and space with null\0
character, and use it as terminator forxargs
instead.