I have the following terminal command:
find /home/not_this/ \! -user not_this_user_account
The goal is to find all the files and directories not owned by the specified user and this version of the find
command works great.
However I'd really like to return the owner of the returned files and directories as well.
So:
/home/not_this/test1.html
/home/not_this/test2.html
Would return this:
someone_else /home/not_this/test1.html
someone_else /home/not_this/test2.html
Or alternatively return this:
/home/not_this/test1.html someone_else
/home/not_this/test2.html someone_else
How do I use the find
command to return both the files/directories not owned by the specified user as well as the owner of those files/directories?
As I don't consider myself well versed in the Linux terminal I'm agreeable to using a different command so long as it returns the desired results and doesn't require some sort of special condition (e.g. downloading and installing something that isn't on literally every Linux distribution).