Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

andywhitt

macrumors member
Original poster
May 15, 2006
41
0
UK
My logs in

/MacBookHD/Library/Logs/Console/501

are filling up all the time with big files e.g
console.log
console.log.0
console.log.1
etc . . .

Example of contents:
2007-04-18 18:40:02.002 Mail[372] Unhandled response to command FETCH: * NO Cannot open message 327
2007-04-18 18:40:02.002 Mail[372] Unhandled response to command FETCH: * NO Cannot open message 328
2007-04-18 18:40:02.073 Mail[372] Unhandled response to command FETCH: * NO Cannot open message 28
2007-04-18 18:40:02.073 Mail[372] Unhandled response to command FETCH: * NO Cannot open message 29
2007-04-18 18:40:02.073 Mail[372] Unhandled response to command FETCH: * NO Cannot open message 30
2007-04-18 18:40:02.073 Mail[372] Unhandled response to command FETCH: * NO Cannot open message 31
2007-04-18 18:40:02.073 Mail[372] Unhandled response to command FETCH: * NO Cannot open message 32
2007-04-18 18:40:02.073 Mail[372] Unhandled response to command FETCH: * NO Cannot open message 33
2007-04-18 18:40:02.073 Mail[372] Unhandled response to command FETCH: * NO Cannot open message 34
2007-04-18 18:40:02.073 Mail[372] Unhandled response to command FETCH: * NO Cannot open message 35
2007-04-18 18:40:02.073 Mail[372] Unhandled response to command FETCH: * NO Cannot open message 36
2007-04-18 18:40:02.073 Mail[372] Unhandled response to command FETCH: * NO Cannot open message 37
2007-04-18 18:40:02.073 Mail[372] Unhandled response to command FETCH: * NO Cannot open message 38
2007-04-18 18:40:02.073 Mail[372] Unhandled response to command FETCH: * NO Cannot open message 39
2007-04-18 18:40:02.073 Mail[372] Unhandled response to command FETCH: * NO Cannot open message 40
2007-04-18 18:40:02.074 Mail[372] Unhandled response to command FETCH: * NO Cannot open message 41
2007-04-18 18:40:02.074 Mail[372] Unhandled response to command FETCH: * NO Cannot open message 42

After examing the files it seems to be a problem with mail, is there anyway to turn this off.

Thanks
 
I don't know that I would worry about it. A page of lines is like 2k, a 500 page log file is around 1 meg., nothing in terms of real space. You have many gigs of space on your hard drive, so this is insignificant as a percentage. Now if you fill up your hard drive you could spend time deleting stuff, but other things would probably go first.

-T
 
Thanks for the reply, i forgot to mention we are talking gigabytes (about 6) every few days, and OSX doesn't seem to do a good job of cleaning them up.
 
Save this to a text file and make sure it is executable.

!# /bin/bash

rm -f /MacBookHD/Library/Logs/Console/501/console.log*

It will automatically delete all your log files every time you run it from the command line.

Edit : You will need to run this with the correct permissions, either through su or on an admin account.

Be careful though, you may want to remove the -f option as that removes the confirmation before it deletes a file. You will need to type either Y or N before each file is deleted if you do remove the -f.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.