location of command binaries among Linux distirbutions.
Dude!Feb 25 2012 — edited Feb 28 2012Hi,
If /usr/bin is the primary directory to store command binaries and /bin the location of essential commands, then distributions like Debian and Red Hat seem to have a different understanding of what commands are essential. Commands like basename, awk, etc. are stored in /bin under Red Hat, but /usr/bin under Debian Linux.
Does anybody know the reason why?
For a bash script to be compatible with all existing Linux distributions and in order to avoid shell environment aliases, path, etc, I wonder if was enough to simply check if a command executable exists in /usr/bin, and if not, assume it is stored in /bin instead.
Would this be sufficient?
Thanks.