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

浙公网安备 33010602011771号