Issue
I need to untar a multiple-file archive. And I have to use a binary to do the actual writing.
With a single file archive, I'm happy with
tar -Oxvf singlefile.tgz | writer filename
for multiple files, tar has a --to-command
option that pipes each file to a specified command. Sounds good but what about the file names?
>tar xvf test.tgz --to-command='writer' 2> /dev/null
tets1
test2
test3
tar
seems to output the filenames to its stdout, and I couldn't find a way to get the filenames within the command.
Any ideas?
Solution
Did you read the tar man page and the GNU tar documentation ?
You might also be interested by tardy
Answered By - Basile Starynkevitch Answer Checked By - Cary Denson (WPSolving Admin)