Linux命令->/>>

> : 将显示的内容输入到指定文件中,覆盖该文件之前的内容。

例:cat /app/tomcat7_1/webapps/test/logs/TestLog/log.log | grep 'test' > /app/tomcat7_1/webapps/test/1.log

>> :将显示的内容输入到指定文件中,文件原始内容不变,在后面继续添加内容。

例:cat /app/tomcat7_1/webapps/test/logs/TestLog/log.log | grep 'test' >> /app/tomcat7_1/webapps/test/1.log

posted @ 2017-02-28 15:37  花生来三两  阅读(507)  评论(0)    收藏  举报