in reply to Directory used % in Linux

 [man://df] df

Replies are listed 'Best First'.
Re^2: <p>Directory used % in Linux </p>
by FloydATC (Deacon) on Jan 31, 2014 at 10:37 UTC

    df only works if that directory happens to be a mountpoint. Otherwise, you'll have to use du, parse the output and calculate the percentage yourself.

    -- FloydATC

    Time flies when you don't know what you're doing

      You seem to understand the OP ....

      Please tell me, what is "used percentage of a directory" supposed to mean if its not a mount point?

      Cheers Rolf

      ( addicted to the Perl Programming Language)

        I've had this problem a few times; the partition where my "/var/log" directory lives is filling up fast, what application (= sub directory) is eating up all the disk space?

        Just guessing the OP has a similar task. It could be home directories, database partitions, whatever.

        -- FloydATC

        Time flies when you don't know what you're doing

        Hi Rolf, We are looking for the amount of disk space used by a directory on a mounted filesystem, for example if a filesystem is allocation for 8gb space and on that file system if I have directory call ABC consuming 4gb space, which means 50% of the space consumed by the directory ABC on that filesystem, can we get this sort information?