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

后端 未结 5 643
无人共我
无人共我 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:35

    You could use xargs and pv. Possibly:

    find . -name "*.php" | pv --line-mode | xargs chmod 755
    

    Note: this is only going to work if your *.php files do not have any spaces or other odd characters in the path or name.

提交回复
热议问题