4.2. Design

4.2.1. Determining Required Commands

The first question that might come to mind is, "How do we know which commands are needed?" It is possible to just start with cat and ls then install other commands as we discover a need for them. But this is terribly inefficient. We need a plan or a blueprint to work from. For this we can turn to the Filesystem Hierarchy Standard (FHS) available from http://www.pathname.com/fhs/. The FHS dictates which commands should be present on a GNU/Linux system and where they should be placed in the directory structure.

4.2.2. Locating Source Code

The next logical question is, "Now that we know what we need, where do we get the source code?" The answer to this question can be found by searching the Internet. There are several good Internet resources out there that can aid us in our quest for source code. One good place to start looking is the Linux Software Map (LSM) on Ibiblio. Ibiblio's LSM search page can be found by navigating to http://www.ibiblio.org/pub/linux. By using the names of commands as keywords, we should be able to come up with the name and location of the corresponding source code package.

4.2.3. Leveraging FHS

So let's look at the FHS requirements for the /bin directory. The first few commands in the list are cat, chgrp, chmod & chown. Using these as keywords in an LSM search we discover that we need GNU's textutils package for cat and GNU's fileutils package for chmod, chgrp & chown. In fact quite a few of the commands in /bin come from GNU's fileutils. So a good way to tackle the problem of finding source code might be to group the commands together by package as shown below.

These four packages do not contain all of the commands in the /bin directory, but they do represent of over 70% of them. That should be enough to accomplish our goal of adding some of the commonly used external commands. We can worry about the remaining commands in later phases of the project.