要将文件中的所有^M字符(Ctrl+v+m)删除掉,可以使用如下命令: cat file1 | tr -d '/015' > file2 其中^M对应015 ^Z对应032 tab对应011 ^对应136 记下了