合并多个文件到指定新文件
find . -name '*.php' -o -name '*.html' | xargs cat |head -n 4000 > ~/Desktop/new.php
介绍:
find 查找
. 当前目录下
-name '*.php' 所有php后缀文件
-o 或者
-name '*.html' 所有html后缀文件
xargs 接收参数
cat 查看文件
head -n 4000 前4000行
~/Desktop/new.php 到这个新文件