9

I want to use dos2unix so I installed the tofrodos package, but it still says dos2unix: command not found.

So I ran:

apt-file update; apt-file search dos2unix

And it gives zero result.

Where is dos2unix in Ubuntu 20.04? Has it been replaced by an equivalent utility?

gronostaj
  • 58,482
Nicolas Raoul
  • 11,561

2 Answers2

12

From the description of the package tofrodos in synaptic:

Tofrodos comprises one program, "fromdos" alias "todos", which converts text files to and from these formats. Use "fromdos" to convert DOS text files to the Unix format, and "todos" to convert Unix text files to the DOS format.

What is wrong with dos2unix and unix2dos is beyond me, and I think it is unbelievable that the package doesn't even make aliases for people who have used linux before and expect dos2unix and unix2dos.

Neal
  • 8,838
3

Where is dos2unix in Ubuntu 2010.04?

On Ubuntu 20.04+, use the Advanced Packaging Tool (APT) to install dos2unix :

sudo apt install -y dos2unix

To find out where it's installed, I ran which dos2unix, which yielded /usr/bin/dos2unix.

Henke
  • 1,261