Minecraft wiki entry for Mac_Scripting_Tutorial, associated text: The first thing we do is check to see if there's already a log file, and if one exists, we rename it with the mv command to the value in the LOGOLD variable. After that, a note gets placed in the log file that the old log has been backed up, and records the time that this script starts running.