• 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: Joe Klemmer <email@hidden>
  • Date: Sat, 26 Jun 2004 20:33:18 -0400
  • Organization: Unix System/Network Administrator & Ad Hoc Programmer

On Sat, 2004-06-26 at 04:49, Walter Ian Kaye wrote:

> >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.)

perl might be a little overkill for this. I'd probably use an awk
command wrapped in a shell script. But then again, I really like awk.

--
My UnKnown Blog
http://x-nc.blogspot.com/
_______________________________________________
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.


References: 
 >Space left script (From: Skylar Bohan <email@hidden>)
 >Re: Space left script (From: Walter Ian Kaye <email@hidden>)

  • Prev by Date: The Finder "Action" toolbar favorite
  • Next by Date: Re: guess the file size of compressed file from the original
  • Previous by thread: Re: Space left script
  • Next by thread: Re: Space left script
  • Index(es):
    • Date
    • Thread