• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Space left script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Space left script


  • Subject: Re: Space left script
  • From: Walter Ian Kaye <email@hidden>
  • Date: Sat, 26 Jun 2004 01:49:15 -0700

At 01:04a -0700 06/26/2004, Skylar Bohan didst inscribe upon an electronic papyrus:

Anyone have any idea on how to make a script that would generate a .txt
file that says how much space is left on a hard drive? One that
refreshes the text file with the size say every half hour. Maybe I have
to make a script that checks the volume space, and then set it to a
cron job. Any ideas?

This Unix command will display free space on the boot volume, in KiB:

df -k /

...among other things. How you parse depends on which other text items you want out of the result, if any. You can use tail to skip the column header line:

df -k / | tail -1

If it were me, I'd do it in Perl and call the perl script from crontab. (Then you could have a prefs file telling the script where to write the file.)


You have your fears which might become reality. And then you have
Godzilla which is reality.
-Godzilla, King of the Monsters

Gojira, so desu.


-boo
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Space left script
      • From: Joe Klemmer <email@hidden>
References: 
 >Space left script (From: Skylar Bohan <email@hidden>)

  • Prev by Date: Space left script
  • Next by Date: Re: Space left script
  • Previous by thread: Space left script
  • Next by thread: Re: Space left script
  • Index(es):
    • Date
    • Thread