Il giorno ven 25 ott 2024 alle ore 09:42 Paul Eggert <egg...@cs.ucla.edu> ha scritto: > > On 2024-10-24 10:09, Matteo Croce wrote: > > > I know that it's possible to pipe the stream with an external process, > > but there are some use cases where a seekable file descriptor is > > preferable. > > If it's seekable, why not seek before invoking 'tar'? E.g.: > > (dd ibs=1024 skip=1 count=0 && tar -tf -) <inputfile > > That way you can use 'tar' as-is, without a new option needed.
Hi, For some weird reason this works when extracting but not when listing archive content: $ ar -tO witalian_cow.deb debian-binary 0x44 control.tar.xz 0x84 _data-pad 0x6c0 data.tar 0x1000 $ (dd status=none bs=4k skip=1 count=0 && tar xv) <witalian_cow.deb ./ ./usr/ ./usr/share/ ./usr/share/dict/ ./usr/share/dict/italian ./usr/share/doc/ ./usr/share/doc/witalian/ ./usr/share/doc/witalian/README ./usr/share/doc/witalian/README.Debian ./usr/share/doc/witalian/TODO ./usr/share/doc/witalian/changelog.gz ... $ (dd status=none bs=4k skip=1 count=0 && tar tv) <witalian_cow.deb drwxr-xr-x root/root 0 2018-06-13 18:37 ./ drwxr-xr-x root/root 0 2018-06-13 18:37 ./usr/ drwxr-xr-x root/root 0 2018-06-13 18:37 ./usr/share/ drwxr-xr-x root/root 0 2018-06-13 18:37 ./usr/share/dict/ -rw-r--r-- root/root 1248830 2018-06-13 18:37 ./usr/share/dict/italian tar: rmtlseek not stopped at a record boundary tar: Error is not recoverable: exiting now Any idea of what happens? Regards, -- Matteo Croce perl -e 'for($t=0;;$t++){print chr($t*($t>>8|$t>>13)&255)}' |aplay