Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best way to convert Windows/DOS files to Unix in batch?

Basically we need to change the end of line characters for a group of files.

Is there a way to accomplish this with a batch file? Is there a freeware utility?

like image 323
Pato Moschcovich Avatar asked Dec 29 '22 21:12

Pato Moschcovich


2 Answers

dos2unix

like image 75
Ken Avatar answered Jan 05 '23 16:01

Ken


It could be done with somewhat shorter command.

    find ./ -type f | xargs -I {} dos2unix {}
like image 42
ityker Avatar answered Jan 05 '23 16:01

ityker