Is it feasible to fix line endings in all non-binary files under a directory?
There are a lot of answers how to fix line endings in a file.
I'm wondering if it is possible for the command to analyze all files and fix only those which needed.
Asked
Active
Viewed 146 times
1

Mike
- 20,010
- 25
- 97
- 140
-
find ./ -type f -exec dos2unix {} \; [source](http://stackoverflow.com/questions/7068179/convert-line-endlings-for-whole-directory-tree-git) – Mike Jun 11 '15 at 15:07
1 Answers
0
find ./ -type f -exec dos2unix {} \;
source – Mykhaylo Adamovych
-
1Note that there are different implementations of dos2unix. Not all of them automatically skip binary files. First check if your dos2unix version skips binary files. – Erwin Waterlander Nov 06 '15 at 16:58