• 本帖最后由 talaon 于 2016-1-12 19:39 编辑 *

需要批量运行此命令
cat test.php > /home/www/xxx.com/test.php
cat test.php > /home/www/zzz.com/test.php
cat test.php > /home/www/....com/test.php

用
find /home/www -maxdepth 2 -name test.php -exec rm {} \;
可以批量删除掉,

但我想批量用另一个文件来替换,
find /home/www -maxdepth 2 -name test.php -exec cat test.php > {} \;

则执行不成功,请问要怎么改?