Reputation: 502
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
Upvotes: 0
Views: 192
Reputation: 106
You can use glob function.
Check it out http://php.net/manual/en/function.glob.php
Upvotes: 1
Reputation: 3144
You can always use FilesystemIterator
, DirectoryIterator
https://www.php.net/manual/en/class.filesystemiterator.php
https://www.php.net/manual/en/class.directoryiterator.php
Upvotes: 1