学以致用

focus on Python , C++, and some interest in Go and R

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

因为经常在windos平台和linux平台之间协同开发,所以不可避免的就碰到了CRLF的问题,dos2unix 和 unix2dos可以说是最常用的解决CRLF问题的工具了。
下面列出怎么对整个目录中的问题做dos2unix操作
$ find . -type f -exec dos2unix {} \;


其中具体命令的解释如下:

find .
= find files in the current directory

-type f
= of type f

-exec dos2unix {} \;
= and execute dos2unix on each file found

posted on 2012-04-24 10:23  Jerry.Kwan  阅读(9576)  评论(2编辑  收藏  举报