命令行基础

man, --help 帮助查看

head -n5 myfile.txt  查看大数据文件。

cat gro.txt |head -n1 将cat gro.txt标准输出(stdin.stream)重定向给head的标准输入(stdout.stream)

grep -i "cat" animal.txt 查找有“cat”的所有行

>输出 会覆盖原文件 grep -i "cat" animal.txt>new.txt

>>增加 会在原有文件的基础上增加

EDITOR=pico ; echo $EDITOR 会输出pico. 可以利用写脚本。

原文地址:https://www.cnblogs.com/canbefree/p/3757110.html