[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Output badformat of "df -h" & "df -T"
From: |
Bob Proulx |
Subject: |
Re: Output badformat of "df -h" & "df -T" |
Date: |
Tue, 13 Jan 2009 20:41:52 -0700 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Olaf Reitmaier Veracierta wrote:
> I'm trying to use the output of the command df -T as input for some
> shell script the problem arises when for some reason some line split
> into two lines, ...
The lines are split when a field is too long to avoid misalignment.
To avoid this use the -P / --portability format. Here is the
documentation from the df manual on it.
`-P'
`--portability'
Use the POSIX output format. This is like the default format
except for the following:
1. The information about each file system is always printed on
exactly one line; a mount device is never put on a line by
itself. This means that if the mount device name is more
than 20 characters long (e.g., for some network mounts), the
columns are misaligned.
2. The labels in the header output line are changed to conform
to POSIX.
Bob