0

I know you can set file format with set ff=unix in vi editor.

But is there a way to do the same with a find -exec {} \; command instead of opening the file in vi?

seke
  • 71
  • 6
  • Generally speaking, this question is a better fit for [unix.se] than Stack Overflow, being more about using UNIX tools than about writing software. – Charles Duffy May 15 '19 at 20:19

1 Answers1

0

Running :set fileformat=unix in vim has the same effect as the (common, but not standardized) dos2unix command. Thus:

find . -type f -exec dos2unix {} +
Charles Duffy
  • 280,126
  • 43
  • 390
  • 441