Results 1 to 3 of 3

Thread: Finding free space

  1. #1
    Senior Member
    Join Date
    Jul 2001

    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
    Clifton Park, NY

    Re:Finding free space

    Assuming the following output:

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

  3. #3
    Senior Member
    Join Date
    Jul 2001

    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. finding mysql dir
    By usaf in forum Linux - General Topics
    Replies: 4
    Last Post: 04-20-2008, 01:16 AM
  2. Free space in GB with df command
    By tech291083 in forum Redhat / Fedora
    Replies: 2
    Last Post: 05-03-2007, 07:57 AM
  3. how to determine free space available in cd
    By deelip_prusty in forum Redhat / Fedora
    Replies: 2
    Last Post: 03-01-2007, 12:27 PM
  4. Finding Problems
    By Ashcrow in forum Linux - Hardware, Networking & Security
    Replies: 11
    Last Post: 04-08-2002, 12:54 AM
  5. free web space provider?
    By phpgeek in forum General Chat
    Replies: 0
    Last Post: 03-23-2002, 04:51 PM


Posting Permissions

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