字符:|。这就是管道符。
作用有两个:
1、承上启下:把上一个指令的输出作为下一个指令的输入来执行。
2、搭配grep 字符实现过滤功能。
用more命令查看 ls -l的输出
[root@localhost tmp]# ls -l /etc/ | more
过滤ps aux的输出
[root@localhost tmp]# ps -aux | grep cron
把输出重定向到文件abc
[root@localhost tmp]# ps -aux | grep cron > abc
字符:|。这就是管道符。
作用有两个:
1、承上启下:把上一个指令的输出作为下一个指令的输入来执行。
2、搭配grep 字符实现过滤功能。
用more命令查看 ls -l的输出
[root@localhost tmp]# ls -l /etc/ | more
过滤ps aux的输出
[root@localhost tmp]# ps -aux | grep cron
把输出重定向到文件abc
[root@localhost tmp]# ps -aux | grep cron > abc