I thought the
bin directory is the place for binary files. If so, what about script files? Should they be placed somewhere else?
What's the history of
bin directory and where should I put script files if the
bin means binary?
Regarding the reason, why it is named that way, and why not,
As far as Linux filesystem hierarchy goes, and FHS project spec documentation is at http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/
/bin directory contains several useful commands that are of use to both the system administrator as well as non-privileged users. It usually contains the shells like bash, csh, etc.... and commonly used commands like cp, mv, rm, cat, ls. For this reason and in contrast to /usr/bin, the binaries in this directory are considered to be essential. The reason for this is that it contains essential system programs that must be available even if only the partition containing / is mounted. This situation may arise should you need to repair other partitions but have no access to shared directories (ie. you are in single user mode and hence have no network access). It also contains programs which boot scripts may depend on.
So, it is not necessary they have to be binary executable files (ELF files) but also scripts which are executable and are essential for system functioning, that can go into /bin directory.
Also, I want to note here that these standards have been in place, I guess, almost for more than 30 years. In rapidly changing times, people may come with new standards which might completely remove the current notations used in the hierarchy.
One of the recent such animal online is
In the earlier times of Unix, the
To my mind,
If your script is usable as if it was a compiled application, just drop it in an appropriate