i m trying to find all readable directories and subdurectories on Linux server using shell command , i have tried this command line:
find /home -maxdepth 1 -type d -perm -o=r
but this command line show me just the readable folders in (/) directories and not subdirectories too.
I want to do that using php or command line
thank you
When you set
-maxdepth 1you're restricting the find command to/homeonly, remove it to allow find to search recursively.If you need a native
phpsolution, you can use thisglob_recursivefunction andis_writable, i.e.: