Although current disk drives afford each user ample storage for ordinary needs, disk space is always finite. Ever-increasing file size and number decrease the total disk space available, and this leads to systemwide slowdown and eventual failure (and probably trouble at the worst possible time). To avoid system constipation, Unix provides tools to monitor and help eliminate unneeded storage. These tools include the du and df commands, which tell you how much space you're using (discussed soon), the piping utility, which reduces the need for intermediate files, and a hierarchical file system, which makes it easy to organize your files and avoid duplication.
An obvious but often ignored way to use disk space efficiently is to delete all files you don't need and to do it before the system administrator or the system does it for you (he/she will probably delete some you need as well). Accordingly, we recommend that you make it a habit to give scratch files manifestly temporary names like temp1, temp2, ... so you can remove them on a regular basis without much concern. Automated cleanup programs as well as many system administrators consider core files, a.out files, and sometimes even *.o files to be disposable if disk space gets short. Files in /tmp can also be removed by any user and are often removed by the system when it is rebooted.
Unix's hierarchical file system is one of its strengths. You can utilize this strength by placing your files in directories based on the project you are working on and by having subdirectories within each directory so that there is no more than a small screenful of files in any one directory. Improving your organization and decreasing the number of files you must think about, also decreases disk storage since you won't be afraid to delete a file when you know what's in it. (This is part of the ``project'' approach described earlier.)
If you want to keep files indefinitely, copy them to a floppy or a backup tape or download them to a microcomputer, and put them on one of its removable disks. That way you'll also have a copy when the system crashes (they all do eventually). As discussed later in this chapter and in Chapter 3, the floppies from a standard PC are also a convenient way to transport and exchange files.