1. 在Elipse中修改设置,window->Preferences-> General->Workspace->Text file encoding和New text file line delimiter里面选择了适合unix的方式就可以了。2. 利用unix自带工具dos2unix。