Recursively read folders and executes command on each of them

后端 未结 7 1580
执笔经年
执笔经年 2020-12-12 21:05

I am trying to recurse into folders and then run commands on them, using bash script. Any suggestions?

相关标签:
7条回答
  • 2020-12-12 21:55

    For most recursive file operations, you want to use find, as the other answers explain.

    There is an example of a recursive bash script included in the bash-doc package. If you've got those examples installed, it will be at /usr/share/doc/bash/examples/functions/recurse (on Debian).

    0 讨论(0)
提交回复
热议问题