Using find with -exec {}, is there a way to count the total?

后端 未结 5 664
无人共我
无人共我 2020-12-29 18:48

I am using a command similar to this one:

find . -name \"*.php\" -exec chmod 755 {} \\;

Although, I am not using chmod, I am using a differ

5条回答
  •  無奈伤痛
    2020-12-29 19:31

    With the -exec option find will start a subprocess for each file found. You could speed this up by using xargs like find . -name '*.php' | xargs chmod 755 - chmod is started only once.

提交回复
热议问题