Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tar:invalid magic, tar:short read

Tags:

linux

termux

I enter this command su -c busybox tar -xvf /storage/emulated/0/Download/andrax.r5-build5.tar.xz -C /data/data/com.thecrackertechnology.andrax/ANDRAX/

and such an error appears tar:invalid magic tar:short read

like image 282
Yaroslav Morozovskiy Avatar asked Oct 26 '25 06:10

Yaroslav Morozovskiy


1 Answers

Automatic detection of the compression format is a GNU feature.

For BusyBox and other tars, specify the format explicitly (busybox tar --help):

    -Z      (De)compress using compress
    -z      (De)compress using gzip
    -J      (De)compress using xz
    -j      (De)compress using bzip2
    -a      (De)compress using lzma

In your case:

busybox tar -xJvf file.tar.xz

(note that if passing it to su -c, the whole command needs to be quoted to be passed as a single argument)

like image 169
that other guy Avatar answered Oct 28 '25 21:10

that other guy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!