发布网友
共3个回答
热心网友
用>或者>>
>:会覆盖文件原来的内容。
>>:会向原文件中附加内容。
举例说明:依次执行如下三条命令。
热心网友
ls -l > dirinfo.txt
热心网友
cat 1.txt >> /tmp/2.txt