Make more space by deleting log files

Fred langa By Fred Langa

Log files can be useful, but they mainly just take up space.

Trim away your useless log files to gain space and make your backups and restores smaller and faster!

Hidden log files eat your disk space

Log files can be useful: They’re usually plain-text records of actions taken by software as it runs — changes made, files added or deleted, and so on. When something goes wrong, it may be possible to examine the appropriate log file to see what the software was trying to do when it encountered trouble. That, in turn, can be a valuable troubleshooting clue.

Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 10, Windows 8, Windows 7, Firefox, Internet Explorer, Google, etc. Join our 460,000 subscribers!

Enter your email above to receive messages about offerings by Penton, its brands, affiliates and/or third-party partners, consistent with Penton's Privacy Policy.
The Windows 7, Vol 3 (Excerpt)

Subscribe and get our monthly bonuses - free!

The Windows 7 Guide, Volume 3: Advanced maintenance and troubleshooting provides advanced tools for keeping Microsoft's premier operating system up and running smoothly. Get this excerpt and other 4 bonuses if you subscribe FREE now!

But over the years, log files have moved from front-line troubleshooting to a rarely used and obscure tool tucked away on your PC. Log files can be like weeds, growing in the quiet corners of your hard drive.

Try this experiment in order to see just how many log files are taking up space on your hard drive:

Click Start, Search, then search All files and folders on your hard drive for any files named *.log. Odds are, you’ll find hundreds of log files you probably never knew existed. (The Windows folder tree alone is a rich repository of log files.) My system currently has almost 900 of the suckers!

With today’s large disks, a passel of small log files isn’t worth worrying about. But sometimes log files can become huge, or a single active program may create a large quantity of log files. Karen Cleveland found one such instance in the ZoneAlarm Security Suite, which practically logs every heartbeat. Let’s take a look at her example, but keep in mind that the log-file proliferation caused by other programs can often be cured in similar ways:
  • "I’ve installed ZoneAlarm (ZA) Internet Security Suite 6.5, which I purchased in the box off-the-shelf at a major computer store. I’m having a problem with ZA writing multiple files to the c:WINNTInternet Logs directory. These files are continually modified by ZA and quickly become very large (i.e., many MBs).

    "I stumbled upon this phenomenon because I noticed the free space on my hard disk kept decreasing day after day. Another problem is that the storage space used by System Restore is also consumed, because these files are backed up when a restore point is created. The restore directory in c:System Volume Information was also growing by leaps and bounds. My hard disk is/was being cannibalized.

    "Do you know how to fix these problems? I don’t want to get rid of ZA, but I can’t continue using it the way it is now."
First and foremost, log files are usually simple plain-text files. You can open them in Notepad and see what they contain. You can delete them if you’re sure that neither you nor the application that created them will need the information inside. (Tip: Copy the log files to a CD or other safe place before you delete them from your hard drive. Then, if it turns out you need the information, it’s still recoverable.)

You also can use various disk-cleaning utilities to delete log files automatically, if you’re sure you no longer need them. For example, the free do-it-yourself CleanAll tool can easily be modified to delete any or all of the log files on your system each time it runs.

But sometimes, software will lock a log file while it’s in use, making it difficult to remove by normal means. A tool like the free and excellent MoveOnBoot (a more powerful paid version is also available) can delete files that are normally locked, in-use, or otherwise unable to be deleted from inside Windows.

The above steps can take care of log files after they’re created. But, of course, it’s best to keep unneeded log files from being generated in the first place. Most log-creating software, including the ZoneAlarm Security Suite, lets you turn off the log file function, if you’re sure you don’t need it.

ZoneAlarm logging
Figure 1. This example shows how the ZoneAlarm Pro firewall lets you control its log keeping. The "Advanced" button allows even finer control.

For example, to enable, disable, or alter event logging and program logging in the ZoneAlarm Security Suite and in the stand-alone Zone Alarm Pro firewall, follow these steps:

Step 1. Select Alerts & Logs.

Step 2. In the Event Logging area, select the desired setting. On creates a log entry for all events. Off means no events are logged.

Step 3. In the Program Logging area, specify the log level. High creates a log entry for all program alerts. Med. creates a log entry for high-rated program alerts only. Off means no program events are logged.

So, if you’re drowning in log files — even hidden log files you never knew existed — you can easily get your head above water. Back up and delete the log files you don’t want or need, and then adjust your software so that it doesn’t create new unnecessary log files in the first place.

Running floppy-based tools with no floppy drive

Some software still legitimately needs to boot from a floppy drive. Reader Chris Henshaw asks what to do when your PC no longer has a floppy to boot from:
  • "I was about to purchase Symantec Ghost for use as ghosting [imaging] software. In the Feb. 8, 2007, issue, you wrote that BootItNG was your favorite. So, after reading the Terabyte Web site, I purchased a copy. When I tried to install it, I found that it required a floppy disk drive. Nowhere was this mentioned — either in your article or on the Terabyte Web site. I have not had a floppy disk drive for some years. Buyer beware!"
Your immediate problem is easily solved, Chris. BootItNG will run happily from any bootable medium, including bootable CDs, and even some Flash drives (depending on your hardware). You can use Terabyte’s free MakeDisk utility, or any number of third-party tools and techniques to convert bootable floppy disk images into CDs or other bootable media. There’s a good tutorial at Ultimate Boot CD.

The reason why BootItNG requires a floppy is also the main reason why I personally like and recommend it: BootItNG is 100% self-contained. When it’s running from its boot medium, Windows is entirely inert. No files are open or in use. Nothing is "live" on the hard drive.

This means that BootItNG’s partition work and imaging work has no competition from other programs while it’s running. Instead, the self-booting utility completely "owns" the PC and so is not likely to run into any problems with locked or in-use files, or files that change during the imaging process.

Most other disk-imaging tools that run from inside Windows (including Terabyte’s own Image for Windows) rely on software sleight-of-hand; features like shadowing to create reliable backups and images of in-use and locked files.

This usually works, but is not 100% certain, as is booting from an external medium. In fact, this is also why some tools that use shadowing and similar techniques still recommend that you close all other programs before making an image or backup. That’s the only way to get the reliability on par with that of externally bootable tools.

Admittedly, it’s less convenient to use a tool that requires a separate boot. To me, it’s worth it for the extra certainty of the imaging/backup process. But, it may not be for you. Indeed, BootItNG has a free trial period in which you can experiment to see if it fits your needs. If it doesn’t, you haven’t lost a dime.

CD-Rs don’t survive freezing temperatures

It’s midwinter here in the northern hemisphere, while our friends on the bottom half of the Earth swelter through summer. Either extreme can be deadly for CDs you create yourself, as reader Dalton Seymour found out:
  • "Just had a look at your Feb. 8, 2007, newsletter comments on how long CDs will last, which referenced McFadden’s FAQ on the subject of CDs. This struck a chord with me because this year, I had the occasion to transport my computer system and collection of CDs from Michigan to Missouri in the dead of winter. Everything was packed up in the back of a pickup truck and covered with a tarp to make the trip. CDs were all in jewel cases packed in cardboard boxes.

    "When they finally arrived, many of the home-grown CDs containing music transferred from vinyl to CD had died. Most were of the gold variety. My guess is that subfreezing temperatures may actually crystallize the dyes embedded in the plastic. These were all CD-R, not CD-RW. I had this happen to me once a long, long time ago with floppy media, but the phenomenon there was related to the lack of hysteresis [persistence of magnetism] at freezing temps."
Right you are, Dalton. CD-Rs last longest in dark and cool (but not cold) environments. If you burn CDs to carry data between work to home, or to rip your own music mixes, or for any other reason, don’t leave them exposed to extreme hot or cold. If you leave a CD-R sitting in your car in subfreezing temperatures or baking in the summer sun, you’ll run the risk of losing the data on that CD in a remarkably short period of time.

Another look at HijackThis

Reader Chris DeWitt’s note focuses on an old favorite antimalware tool:
  • "I’ve done some PC housecleaning for various people and found that some of the common tools I’ve used (Ad Aware, Spybot, NAV) don’t always do the job. After I’ve used them, I turn to HijackThis.exe. It does a scan of your system and gives you a listing and log file of lots of potential malware files. It takes pains to tell you that these are not guaranteed to be malware, but could be. It’s up to you to then go through each line, research the item, and determine for yourself if it is a culprit.

    "If you then redo the scan, you can check the appropriate lines in the list and click the Fix Checked button. It will then remove most of these. Some of the remaining items may need more sophisticated removal techniques. If you send the log file to one of the many online forms, you can get help both in determining which of these is malware and in removing the more stubborn ones. It’s a lot of work, but it can be done. Here is a link to one of the places you can get HijackThis.”
HijackThis is indeed an excellent and powerful tool. It produces so much information that it can actually be intimidating the first time you run it! Windows Secrets has discussed and recommended HijackThis on several occasions, including in the March 10, 2005, issue. The advice given then still stands today:
Thanks, Chris!

Fred Langa edited the LangaList e-mail newsletter from 1997 to 2006, when it merged with Windows Secrets. Prior to that, he was editor of Byte Magazine and editorial director of CMP Media, overseeing Windows Magazine and others.
= Paid content

All Windows Secrets articles posted on 2007-02-22:

Fred Langa

About Fred Langa

Fred Langa is senior editor. His LangaList Newsletter merged with Windows Secrets on Nov. 16, 2006. Prior to that, Fred was editor of Byte Magazine (1987 to 1991) and editorial director of CMP Media (1991 to 1996), overseeing Windows Magazine and others.