Go Back   The macosxhints Forums > OS X Help Requests > System

Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Old 03-16-2010, 03:56 PM   #1
Join Date: Mar 2010
Posts: 12
Increase limit for low disk space warning?

Is there any way to increase the limit at which OS X warns about the startup disk being almost full?

At least on Tiger (I've only recently upgraded my old G4-based Mac to Leopard), OS X shows a warning reading "Your startup disk is almost full ..." when the amount of free space drops below 512MB. In my experience, this limit is set too low, and I'd like to increase it to say 1GB.

Is there some way to increase the limit, perhaps via a hidden preference that can be changed using the well-known "defaults write ..." ?

Note: I'd prefer *not* to have to resort to a third-party application.
Rinzwind is offline   Reply With Quote
Old 03-18-2010, 05:07 AM   #2
League Commissioner
Join Date: Aug 2006
Location: London
Posts: 5,819
The free space is displayed at the bottom of every Finder Window.

I'm not sure what the limit is in later OSes, but if you've got less than 5Gb spare, then I'd start thinking about moving stuff off or replacing the drive.
benwiggy is offline   Reply With Quote
Old 03-18-2010, 07:26 AM   #3
League Commissioner
Join Date: Sep 2003
Location: Tokyo
Posts: 6,334
The server application `diskspacemonitor` works on a percentage basis, not on a fixed value, so the Finder may use the same criteria. I agree with Ben that under 5Gb is time to do some housecleaning - with Terabyte drives selling for under $100 you really don't have many excuses anymore.
acme.mail.order is offline   Reply With Quote
Old 03-18-2010, 06:24 PM   #4
Hal Itosis
Hall of Famer
Join Date: Apr 2002
Posts: 3,315
Here's an ad hoc shell script i just pieced together...

$ cat frds


#!/bin/bash -
IFS=$' \t\n'
declare -x PATH=/bin:/usr/bin

maxPercentFull=87	# <--set desired maximum percent full
minMegsFree=1234	# <--set desired minimum megabytes free

txt='Um, the boot disk is getting kinda full.'
vol=$(ls -1F /Volumes |sed -n 's:@$::p');

percentFull=$(df -m / |awk 'NR==2 {printf "%d",$5}')
megsFree=$(df -m / |awk 'NR==2 {printf "%d",$4}')

if [ $percentFull -gt $maxPercentFull ] ||
   [ $megsFree -lt $minMegsFree ]
	msg="$vol is ${percentFull}% full with only $megsFree megabytes free."

	osascript <<-AppleSkript
		tell application "System Events"
			set frontApp to (name of (some process \
				whose frontmost is true)) as text
		end tell
		tell application frontApp
			with timeout of 1234567 seconds --or whatever you like
				display alert "$txt" message "$msg" as warning
			end timeout
		end tell
exit $?
Need to schedule it with a launchd plist... every 3 minutes or so, maybe. (could get cluttered if the user doesn't click OK within the timeout period). Also, make sure that's a tab before the last "AppleSkript" -- spaces might confuse the HereDoc.
Hal Itosis is offline   Reply With Quote
Old 03-22-2010, 08:45 AM   #5
Join Date: Mar 2010
Posts: 12
Thanks for the advice! Will try out the script
Rinzwind is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 04:34 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.