Remix.run Logo
meinersbur 3 hours ago

Changing execution behaviour based on filename is common in Linux environments too. Some examples:

1. BusyBox is a single executable that executes different commands based on which symlink was used to call it

2. Bash puts itself into compatibility mode if invoked as "sh"

3. "ping" can be invoked as "ping4" or "ping6"

4. Some of git's subcommands are symlinks back to the main executable

5. Clang switches to C++ mode if invoked as "clang++"

6. AppArmor profiles activate on file paths

LelouBil 3 hours ago | parent | next [-]

Your examples are interested, but not comparable.

In your list these are executables that change their own behaviour based on how they are called, whereas in the OP it's the OS changing code based on the name of an application.

saati 3 hours ago | parent | prev [-]

But 1-5 is the executable making decisions based on it's command name, not the OS changing behavior.