link to dos2unix

Lars Eighner luvbeastie at
Sun Mar 1 04:47:05 PST 2009

On Sun, 1 Mar 2009, Fbsd1 wrote:

> I get message ==oops you renamed me using unix2dos instead.

Someone else has already replied that the binary only knows what to
do by checking the name used to call it.  The way to do what you want
is to use an alias in your shell.  In BASH this would be

alias d2u='dos2unix'

in .profile.

Then run source .profile, or log out and log in.

This may vary according to which shell you use.  Consult the man
for your shell.

The reason this works is that the shell resolves the alias before it
calls the command, so the command never knows what you really typed.

A number of applications are like this.  Aliasing is the right way to make
shortcut names, rather than creating links.  If you want the alias to work
system-wide, edit the system confifuration file for the particular shell. 
If users use several different shell, you do have to add the alias to each
distinct configuration file.

Lars Eighner
8800 N IH35 APT 1191 AUSTIN TX 78753-5266

More information about the freebsd-questions mailing list