linux怎么搜索特定文件夹,linux如何在特定文件夹中查找特定文件
user1880957
24
linux
find
這是我的文件夾結構:
/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 {} \; \;
總結
以上是生活随笔為你收集整理的linux怎么搜索特定文件夹,linux如何在特定文件夹中查找特定文件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Redmi K70系列今晚发布 配置已基
- 下一篇: 亚马逊推出新 AI 量子芯片 Train