Tidying up disk space

One of the most routine and mundane (and yet, vitally important) tasks that a system administrator has to complete on a routine basis is clearing out disk space. Although ideally, systems should be well behaved—for example, log files should be rotated, and temporary files cleaned up—those with experience in the industry will know that this is not always the case. The author of this book has worked in environments where clearing out a given directory was considered a routine task—hence, a prime candidate for automation.

Of course, you would not just randomly delete files from a filesystem. Any task like this should be performed in a precise manner. Let's proceed with a practical example—as this is hypothetical, let's ...

Get Hands-On Enterprise Automation on 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.