0

I've been learning bash and unix by reading source code.

This particular bit I don't understand why it was done.

The main tool executable is a symbolic link. Whats the benefit here?

enter image description here

source

1 Answer 1

0

In the case of a multi-call binary, like kmod calls itself, the idea provide a simple user interface - some options less.

man kmod says: "Most users will only run it using its other names."

$  ls ??mod ???mod modprobe kmod -l
-rwxr-xr-x 1 root root  63496 Mar 11  2019 chmod
lrwxrwxrwx 1 root root      4 Feb 13  2019 depmod -> kmod
lrwxrwxrwx 1 root root      4 Feb 13  2019 insmod -> kmod
-rwxr-xr-x 1 root root 161856 Feb 13  2019 kmod
lrwxrwxrwx 1 root root      4 Feb 13  2019 lsmod -> kmod
lrwxrwxrwx 1 root root      4 Feb 13  2019 modprobe -> kmod
lrwxrwxrwx 1 root root      4 Feb 13  2019 rmmod -> kmod

In your example, it means: there is one big executable/library, not the "usual" bin/exec plus some/lib/library. So just use any symlink to call it. Or rather: use a symlink rbenv from anywhere. Makes certain aspects of developing easier I guess.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .