这是我的文件夹结构:
/site1/myFolder/otherFolder1/a.gif
/site1/myFolder/otherFolder1/b.png
/site1/myFolder/otherFolder1/c.PHP
…
/site2/myFolder/otherFolder2/d.gif
/site2/myFolder/otherFolder2/e.png
/site2/myFolder/otherFolder2/f.PHP
…
/site3/myFolder/otherFolder3/g.gif
/site3/myFolder/otherFolder3/h.png
/site3/myFolder/otherFolder3/i.PHP
…
得到这么远
find /var/www/html -type d -name myFolder -exec find {} -name "*.PHP" \; for i in `find /var/www/html -type d -name myFolder -exec find {} -name "*.PHP" \;` do some_house_keeping_here done
但是我想做这样的事情:
find /var/www/html -type d -name myFolder -exec find {} -name "*.PHP" -exec do_some_housekeeping {} \; \;