Maximizing Disk Space

Generally, it's best not to allow free space on your hard drive to fall below 25–30 percent of your hard drive's total capacity. The following sections examine ways to keep an eye on disk space, and (more importantly) ways to reclaim parts of a shrinking hard disk pie.

Performing System Cleanups

While the kernel and other Linux processes run, they generate a number of housekeeping files. Often, Linux automatically disposes of these files but sometimes you must take matters into your own hands. For instance, if you are creating your own logs, use a redirect command such as >> (append); the files used by that redirect will continue to grow until removed.

Linux provides two commands to check on disk usage, df and du, described ...

Get Practical Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.