bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] tar -vf /dev/stdout produces corrupted archives


From: fedusr
Subject: Re: [Bug-tar] tar -vf /dev/stdout produces corrupted archives
Date: Tue, 11 Dec 2007 09:04:20 +0100
User-agent: Thunderbird 2.0.0.9 (X11/20071115)

Why is 'tar --create --verbose' output not sent to <stderr>? There could be a default value switching <stdout> to <stderr> in '--create' operations, and '--list' keeps operating in <stdout> stream mode.

But it remains a little bit strange resp. a dilemma. The 'GNU Coreutils Manual' says:

'Briefly, "standard input" is a data source, where data comes from. A program should not need to either know or care if the data source is a disk file, a keyboard, a magnetic tape, or even a punched card reader. Similarly, "standard output" is a data sink, where data goes to. The program should neither know nor care where this might be.'

But, tar does care about his 'sink'. If it is a file, verbose output is being sent to <stdout>. If it is <stdout>, verbose output is sinking to <stderr>:

'Verbose output appears on the standard output except when an archive
is being written to the standard output, as with `tar --create --file=-
--verbose' (`tar cfv -', or even `tar cv'--if the installer let
standard output be the default archive).  In that case `tar' writes
verbose output to the standard error stream.' (GNU Tar Manual)

In addition, tar fails doesn't recognize the symlink '/dev/stdout' as <stdout>.

Andreas




reply via email to

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