Results 1 to 3 of 3

Thread: Finding free space

  1. #1
    Senior Member
    Join Date
    Jul 2001
    Posts
    280

    Finding free space

    Is there a command line program like [tt]df[/tt] that can determine the amount of free space on a partition, but prints out only that number so I can use it in a script?

    Thanks for your help.

  2. #2
    Advisor Outlaw's Avatar
    Join Date
    May 2001
    Location
    Clifton Park, NY
    Posts
    630

    Re:Finding free space

    Assuming the following output:

    Code:
    saturn:~# df -h /usr
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/hda6             9.4G  484M  8.9G   6% /usr
    Code:
    saturn:~# df -h | grep /usr | awk '{print $4}'
    8.9G



  3. #3
    Senior Member
    Join Date
    Jul 2001
    Posts
    280

    Re:Finding free space

    [quote author=Radar link=board=2;threadid=10680;start=0#msg95915 date=1126580095]
    Assuming the following output:[/quote]

    Thanks. I knew it would be something simple like that. I was playing with sed and grep and perl. :-)

Similar Threads

  1. how to determine free space available in cd
    By deelip_prusty in forum Redhat / Fedora
    Replies: 2
    Last Post: 03-01-2007, 11:27 AM
  2. Free Beer That's Free as in Speech
    By trickster in forum General Chat
    Replies: 3
    Last Post: 07-25-2005, 06:38 PM
  3. Free Enough?
    By cga in forum General Chat
    Replies: 9
    Last Post: 06-19-2005, 01:47 PM
  4. Free USB Thumb Drive
    By GhostDawg in forum Linux - Hardware, Networking & Security
    Replies: 17
    Last Post: 09-17-2004, 10:10 AM
  5. free web space provider?
    By phpgeek in forum General Chat
    Replies: 0
    Last Post: 03-23-2002, 03:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •