Fork me on GitHub

Programming, Internet & more

How to convert files in a directory from windows to unix

I you copy files from windows to a unix system, you have to take care about the line endings.

This is a quicktip how you can convert all files in a directory from windows to unix line endings. You need the program dos2unix, if it’s not installed on your system you can install it with

apt-get install dos2unix

Then you can convert all the files in your current directory with:

find . -type f -exec dos2unix {} \;
Category: linux

Leave a Reply

Your email address will not be published. Required fields are marked *