https://www.cnblogs.com/joechu/p/8916032.html

 

cat file > file 这样会将file中的文件清空