Is there any way to list all files in a Mac terminal that have a specific owner?

1

In my case the ownership would belong to Macports, which I removed. However, I found there are still some files here and there that apparently belong to Macports and I would like to remove them as well.

user238311

Posted 2013-07-15T17:51:44.560

Reputation:

Answers

3

You can use find tool for that:

find /path/to/search -user <username>

or if you want to list only files from current dir without subdirectories

find /path/to/search -maxdepth 1 -user <username>

Prepend -ls to have the output more like ls

find /path/to/search -user <username> -ls

Karsten S.

Posted 2013-07-15T17:51:44.560

Reputation: 532

Wow thanks a lot that did the trick! (StackExchange wants me to wait 5 minutes for accepting your answer though...) – None – 2013-07-15T18:00:50.733

One more question though. Does this also show hidden files? – None – 2013-07-15T18:07:32.960

It will also show files starting with ., yes. – Karsten S. – 2013-07-15T18:11:21.643