I need to execute following linux find command
find /home/*/mail/ -type d -name ".test" > tmp_file
but using php (since the find command for some reason freeze in some OS) .
How to do this search using php and put results in tmp_file?
Thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can always use
FilesystemIterator,DirectoryIteratorhttps://www.php.net/manual/en/class.filesystemiterator.php
https://www.php.net/manual/en/class.directoryiterator.php