Linux学习笔记2输出重定向:输入三次以下文本,echo"Welcome to LinuxProbe.Com"readme.txtecho"Welcome to LinuxProbe.Com"readme.txt、echo"Welcome to LinuxProbe.Com"readme.txtcatreadme.txt打开readme.txt发现只有一行”Welcome to LinuxProbe.Com“再执行一次:echo"Welcome to LinuxProbe.Com"readme.txtecho"Welcome to LinuxProbe.Com.123"readme.txtcatreadme.txt Welcome to LinuxProbe.Com Welcome to LinuxProbe.Com Welcome to LinuxProbe.Com.123打开readme.txt发现在后面新增了两行。命令 文件 :将标准输出重定向到一个文件中(清空原有文件的数据)命令 文件 :将标准输出重定向到一个文件中(追加到原有内容的后面)ls-lxxx~/stderr.txt ls: 无法访问'xxx':没有那个文件或目录ls-lxxx2~/stderr.txtstderr.txt本不存在,执行后报错,命令ls -l 2 ~/stderr.txt 执行后生成了stderr.txt,将错误信息写进去了。输入重定向:wc-l/etc/passwd38/etc/passwd统计系统中有多少个用户账户因为 /etc/passwd 文件每行代表一个用户,所以行数 = 用户数量。管道命令符:命令 A | 命令 Bpsaux|grep