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 1
you're restricting the find command to/home
only, remove it to allow find to search recursively.If you need a native
php
solution, you can use thisglob_recursive
function andis_writable
, i.e.: