Thread: *nix and df

    #1
  1. PHP & Java Error Master
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2003
    Location
    My Computer
    Posts
    1,219
    Rep Power
    0

    *nix and df


    I've noticed different behavior when using df -k on AIX, Linux (red hat) and SunOS.

    Is there anyway to get the same format out of all 3?

    For example, Sun and Linux use spaces, while AIX uses tabs.
    Also, AIX has different column headers than AIX's.

    I'm trying to parse the output of the filesystem info and not having a consistant format makes it very difficult.

    Thanks.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jul 2004
    Location
    Middle Europa
    Posts
    1,198
    Rep Power
    17
    ich glaube, the only way: an own filter checking and according to OS
    reformating the output of df (using: awk, perl or c, all other are too slow).
    df -k {argv} dffilter
    maybe you find a prog in net (google)

IMN logo majestic logo threadwatch logo seochat tools logo