Example:
find / *
Gives me all files and directories, but I want only those files I may read and those directories I may see the contents of. Otherwise I get problems as when I try to find file information for all files:
for i in ls $( find / * ); do file $i; done
Which results in:
find: /lost+found: Permission denied
find: /proc/tty/driver: Permission denied
find: /proc/1/task/1/fd: Permission denied
find: /proc/1/fd: Permission denied
find: /proc/2/task/2/fd: Permission denied
find: /proc/2/fd: Permission denied
find: /proc/3/task/3/fd: Permission denied
# and so on ...
If it's possible I would like it in a generic way, so that I may use the same command line regardless of which user I am logged in as, but still get those files and directories I may see as a result from find.