|
|
#1 |
|
Prospect
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. |
|
|
|
|
|
#2 |
|
League Commissioner
Join Date: Aug 2006
Posts: 5,039
|
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. |
|
|
|
|
|
#3 |
|
League Commissioner
Join Date: Sep 2003
Location: Tokyo
Posts: 6,045
|
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.
|
|
|
|
|
|
#4 |
|
Hall of Famer
Join Date: Apr 2002
Posts: 3,315
|
Here's an ad hoc shell script i just pieced together...
$ cat frds Code:
#!/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 ]
then
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
AppleSkript
fi
exit $?
|
|
|
|
|
|
#5 |
|
Prospect
Join Date: Mar 2010
Posts: 12
|
Thanks for the advice! Will try out the script
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|