I’m having issues in OS X; for various reasons, a bunch of my Apps are owned by a different Admin user, one I never log in as. Most of the time this is a non-issue; just have to type in a password to monkey with the files. But it’s caused a few problems, and I’d like to get them all on the same page.
However, there are also apps in /Applications which are owned by root. I figure I shouldn’t change those.
So, is there a script I can run that will check to see which files are owned by the old user and only change ownership on those?
Thanks! You got me off on the right track. Everything I tried gave me a “too many arguments” error of some variety, but I managed to come up with this beast that worked:
I presume you’ve also used the Disk Utility’s “Repair Permissions” feature? It deals with a wide range of these sorts of things without having to go to a command line, although it’s exact behaviour is a little mysterious.
This uses the “-exec” switch of the “find” command. Just put the curly braces wherever you want the individual files found to go in the command string, and remember to put the backslash-semicolon at the end of the command.
The command in “-exec” will be executed once per line produced by “find”