bash loop through all find recursively in sub-directories bash loop through all find recursively in sub-directories shell shell

bash loop through all find recursively in sub-directories


FILES=$(find public_html -type f -name '*.php')

IMPORTANT: Note the single quotes around the *.php to prevent shell expansion of the *.


FILES=`find public_html -type d`

$FILES will now be a list of every single directory inside public_html.