Linux输入输出重定向练习

1、date >> 123

     date > 123

2、abc 2>123

    abc 2>>123

  abc 2>/dev/null  标准输出重定向到回收站

3、date & > 123

     abc & >123

4、date >>123  2>&1

     abc >>123 2>&1

(注:123为文件名   date、abc为命令)

 5、进入tmp目录

touch  abc

crontab -e    输入  */1  * * * * date   >>/tmp/abc    

6、管道符 |

ls  -l  /etc/  

ls  -l  /etc/  | more  (将etc目录里面的内容,用more命令进行查看)

ps  -aux

猜你喜欢

转载自www.cnblogs.com/zouhong/p/10199248.html