[Top][All Lists]

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

Re: [Bug-tar] Tar's --xattrs | --selinux | --acls listing feature

From: Andreas Dilger
Subject: Re: [Bug-tar] Tar's --xattrs | --selinux | --acls listing feature
Date: Thu, 3 May 2012 12:27:59 -0600

On 2012-05-03, at 6:10 AM, Pavel Raiskup wrote:
>> Something like that looks reasonable.
>> One major comment, though, is that the output of
>> tar should be parsable, i.e., it should be possible
>> to look at the output, figure out what format it is,
>> and parse it reliably.  The current format doesn't have
>> that property, but these extended formats ought to, no?
> I'm not sure if I follow you correctly -- you mean some 'universal' parser 
> that gets tar's -t output and parses it alway correctly and gets as much info 
> as possible?
> IIUC -- In previous proposal it is not so easy to achieve this goal in
> case that there is the 'vv' (not 'vvv') output requested.  There may occur 
> some ambiguity between --xattrs lines and --acls "added" lines, yes?
> .. other possibility is to add two bytes -- 'CHARACTER COLON' before each
> additional line.  Extended attributes e.g. "x:" for --xattrs, "a:" for
> --acls and "s:" for security context.  Again -- the 'vvv' is not needed
> now and even its header can go out.  Or ..
> .. do you (or other listener of this channel) see even other better
> solution?

If you are looking for an output format that is relatively easy for humans to 
read, but is still well formatted and machine parseable, please consider using 
YAML.  This is a colon-delimited text format, similar to what you propose 
above, but has a few more features.  There are YAML parsers for virtually every 
language, so should be considered as the first choice of machine-readable 
textual output, rather than inventing some new format.

Cheers, Andreas

reply via email to

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