emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-bug-tracker] bug#7157: closed (df should default to -P if output


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#7157: closed (df should default to -P if output is not a tty)
Date: Thu, 24 Mar 2011 00:15:04 +0000

Your message dated Thu, 24 Mar 2011 00:11:40 +0000
with message-id <address@hidden>
and subject line df no longer wraps lines
has caused the GNU bug report #7157,
regarding df should default to -P if output is not a tty
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
7157: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7157
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: df should default to -P if output is not a tty Date: Mon, 04 Oct 2010 11:44:15 +0200 User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Lightning/1.0b2 Thunderbird/3.1.3
Hello,

We just had a case where an overfull disk went unnoticed by logwatch.

The reason turned out to be its long device name (/dev/mapper
/VolGroup00-LogVol00), which caused df to break the line, messing up
the column count. Indeed, logwatch looks for the use% in the fifth
field, but due to this line breaking, the use% for this disk ended up
in the _fourth_ field of the next line instead.

There is an option to prevent this behavior (-P), but apparently the
logwatch authors were not aware of it. Understandably, I might say,
because if their test cases happen to only have disks with short names,
they'll never stumble upon this.

So, in the name of the "principle of least surprise" wouldn't it be
possible to make -P the default if the output is not a tty (and add an
additional flag for those rare cases where this line-breaking behavior
is actually wanted on non-tty's)

Other utilities, such as Debian's dpkg -l, also default to this
behavior (trimming lines to window width if output is a tty, and not
trimming it if output is not a tty). Same thing for ls (column output
on a tty, one file-name per line on non-tty)

The problem was observed on version coreutils-8.4-8.fc13.i686:

# df | cat
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      66688656  47463424  15782956  76% /
/dev/cciss/c0d0p1       197546     19124    168223  11% /boot
tmpfs                   517468        12    517456   1% /dev/shm

Thanks,

Alain



--- End Message ---
--- Begin Message --- Subject: df no longer wraps lines Date: Thu, 24 Mar 2011 00:11:40 +0000 User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3
Since I've just changed df to no longer split
entries with long device names over two lines
(since it now aligns columns consistently),
I'm closing these.

cheers,
Pádraig


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]