Tuesday, July 10, 2012

Terminal 101: Setting Up and Running Disk Maintenance

Every Monday, we'll show you how to do something new and simple with Apple's built-in command line application. You don't need any fancy software, or a knowledge of coding to do any of these. All you need is a keyboard to type 'em out!

Hardware maintenance is one way to ensure that your Mac has a long and prosperous life of reading and writing bits, but software maintenance is also very important to preserving the speed and performance of your machine. By default, your Mac will automatically perform scheduled maintenance at regular daily, weekly, and monthly intervals; however, it may be important to run some of these scripts more often than prescribed by OS X. Read on to learn how to check when the scripts last run, and run them manually through the Terminal.

Why Run these Scripts Manually?

Occasionally, the scripts may not run properly (or at all) if your computer is frequently shut down or in sleep mode. In this case, these scripts allow you to manually invoke the scripts to ensure that OS X is properly cleaning up and rotating the log files.

What is a log file rotation?

In Unix-based systems, it is important to rotate the log files on daily, weekly, or monthly intervals to ensure that the log file doesn’t get out of hand. Without rotating the log files, they will constantly grow until they eventually expand to take all available disk space. To prevent that, rotation of the files is important. When a log file is rotated, the current log is archived with a date/time stamp. When the files become old, they will be deleted from the system to conserve disk space.

1. Determining When the Scripts Last Ran



View the Original article

No comments: