ls ./ | wc -l //记录当前目录下文件数目
cat ./test.txt | head -n 1 //显示文件开头前一行
cat ./test.txt | tail -n +3 | head -n 4 //显示文件从倒数第三行开始前3行
grep -l test * //列出内容含有test字段的文件名
find ./ | grep main //查找当前目录下文件名含有main字样的文件,包括当前目录下的子目录
原文:https://www.cnblogs.com/xxxsea/p/11631871.html