> 表示“覆盖”,>> 表示“追加”。前者会覆盖文件内容,后者会在文件末尾添加新内容。 echo foo > file echo bar > file cat file # => bar echo foo > file echo bar >> file cat file # => foo # bar