How to do the equivalent of a Unix find / -print [under user permissions] under Mountain Lion

command lineunix

I am doing, or trying to do, a 'find /' which I would like to recursively list every file the user has permission to access under the volume "Macintosh HD" and nothing else.

I am presently filtering out the output of the find to exclude files under Backups.backupdb. This is a partial solution at best because the system is bogging under attempts to access flaky NSF mounts.

Is there a shell command that I can use that will stay on "Macintosh HD", recursively list file paths, and leave other volumes alone?

Best Answer

find can do this itself as per Apple's man page. You ned the -x option to

Prevent find from descending into directories that have a device number different than that of the file from which the descent began.