posted 14 years ago
There are 2 ways that symbolic links are useful in Linux (and the other *n*x OS's) for executing programs.
1. As a simple alias. For example, people are used to invoking "vi", but there are actually a number of vi-like editors out there. Often the "vi" on a Linux system is really vim. But since "vi" is the generic name, it makes life (and how-to books) easier to alias "vi" to be a shortcut to starting vim. A lot of people don't even realize they're not really runnin vi until they encounter a system where "vi" brings up the real vi. Likewise, some systems allow you to invoke Perl as either /usr/bin/perl or /bin/perl.
2. As a convenience feature. A good example is the ldapmodify prorgam. It has an alias of "ldapadd". When you run this utility, the startup code looks at the name you used. If you started it using the "ldapadd" name, the add mode features are automatically switched on.
Perhaps the most extreme example of aliasing is the BusyBox utility. BusyBox is an all-in-one program that provides the basic functions of a host of Unix utilities. It's intended for use in settting up minimal systems where disk space may be limited, and it allows you to install them all by copying a single file. A lot of Unix utilities have common functionalities, so you can save significantly by only having one copy of them.
So when you invoke grep, you run BusyBox and it runs its grep utility. Invoke it from the sed alias, you get sed, and so forth.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.