bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] Parsing the output of `tar tvf'


From: Sergey Poznyakoff
Subject: Re: [Bug-tar] Parsing the output of `tar tvf'
Date: Wed, 18 Jan 2006 17:42:28 EET

CVS version of GNU tar implements --quoting-style and --quote-chars
command line options that control the way tar quotes member names on
output. The --quoting-style takes an argument, specifying the quoting
style to use (literal, shell, shell-always, c, escape, locale,
clocale). The argument to --quote-chars option is a string adding
characters to a list of quoted characters. The option --no-quote-chars
is provided to disable quoting certain characters. Below are a couple of
examples, illustrating how these options would affect the test case
proposed by Helmut[1]: 

$ tar --quoting-style=shell -tvf archive
drwxr-xr-x gray/staff        0 2006-01-12 21:14 ./
-rw-r--r-- gray/staff        0 2006-01-12 21:12 ./link
lrwxrwxrwx gray/staff        0 2006-01-12 21:12 './file ->' -> link
lrwxrwxrwx gray/staff        0 2006-01-12 21:12 ./file -> '-> link'

$ tar --quoting-style=c -tvf archive
drwxr-xr-x gray/staff        0 2006-01-12 21:14 "./"
-rw-r--r-- gray/staff        0 2006-01-12 21:12 "./link"
lrwxrwxrwx gray/staff        0 2006-01-12 21:12 "./file ->" -> "link"
lrwxrwxrwx gray/staff        0 2006-01-12 21:12 "./file" -> "-> link"

$ tar --quote-chars=" " -tvf archive
drwxr-xr-x gray/staff        0 2006-01-12 21:14 ./
-rw-r--r-- gray/staff        0 2006-01-12 21:12 ./link
lrwxrwxrwx gray/staff        0 2006-01-12 21:12 ./file\ -> -> link
lrwxrwxrwx gray/staff        0 2006-01-12 21:12 ./file -> ->\ link

Regards,
Sergey

[1] http://lists.gnu.org/archive/html/bug-tar/2006-01/msg00019.html




reply via email to

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