I found some problem with linux gnu tar. wheh I use option
-T - (for file list from stdin) or
-T named_pipe_file ,
this desn't work on the fly. for example, simple interactive script:
while read x; do echo $x; done|\
tar cvf tar.tar -T -
tar starts archiving only when I press ^D for marking input EOF the same situation is when I use named pipe:
mkfifo named_pipe
tar cvf tar.tar -T named_pipe
while read x; do echo $x; done >named_pipe
It seems tar makes some buffering. But how long is it? I must repack a lot of files to TAR but have little disk space. Then I must do this on the fly. I waht use tar option --remove-files for this. But without interactivity for -T option it's impossobie. In the plan, "while" part of code should unpack file to file sequently and waiting for TAR for removing, and next file. Thanks for ideas :)
my tar version: tar (GNU tar) 1.26 (C) 2011 FSF
tar
file names or the actual data it should compress? The-T
option expects a list of file names and works as advertized in a loop on my system.