How do I convert a file from DOS to Unix in Linux?

How do I convert a file from DOS to Unix in Linux?
Answer
You can use the following tools:
  1. dos2unix (also known as fromdos) – converts text files from the DOS format to the Unix. format.
  2. unix2dos (also known as todos) – converts text files from the Unix format to the DOS format.
  3. sed – You can use sed command for same purpose.
  4. tr command.
  5. Perl one liner.
 

Tìm kiếm

Back
Top