$ : > filename $ > filename $ echo "" > filename $ echo > filename $ cat /dev/null > filename
上面3种方式,能将文件清空,而且文件大小为0而下面两种方式,导致文本都有一个" ",而使得文件大小为1