Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
09-10-2014, 07:50 PM
|
#1
|
LQ Newbie
Registered: Aug 2012
Location: Modena - Italy
Posts: 12
Rep:
|
tar does not 'tar' / 'untar' tarballs anymore
When i try to extract my tar.gz archives with tar xvzf i get:
tar: muxPi_Arch_13.img: Wrote only 2559 of 10240 bytes
Tested gzip and it works, tryed to compress and extract with zip and 7zip
the same files and they worked, reinstalled tar and updated, problem remains.
Some people had a lack of space in the HDD but if i do a check is not what the problem
seems to be:
bash-4.2# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 413G 84G 309G 22% /
tmpfs 1.5G 524K 1.5G 1% /dev/shm
/dev/sdb1 459G 89G 347G 21% /mnt/HDD2
Any idea? Thanks.
|
|
|
09-10-2014, 09:34 PM
|
#2
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,179
Rep:
|
It's hard to help if we don't know the characteristics of the file. Please provide output of following command: Also, if possible indicate the way the tarball was built, its content, and if publicly available a link to it. Bear also in mind that the tar command is generally not relevant for compressed single files.
In addition for recent versions of tar, the z option (as the j option) is generally useless as tar can "guess" the compression algorithm.
Last edited by Didier Spaier; 09-10-2014 at 09:43 PM.
|
|
|
09-11-2014, 12:44 AM
|
#3
|
Senior Member
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557
|
I'm gonna bet that is not a tar file. Try bsdtar which is also installed. It can read a variety of formats. You can check the format by issuing the following
Code:
bsdtar tvvf muxPi_Arch_13.img
|
|
|
09-11-2014, 07:21 AM
|
#4
|
Senior Member
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557
|
Quote:
Originally Posted by Didier Spaier
In addition for recent versions of tar, the z option (as the j option) is generally useless as tar can "guess" the compression algorithm.
|
Generally but not totally. If the compressed tar file is received through a pipe you must specify the correct decompressor, e.g.
Code:
$ cat example.tar.gz | tar x
tar: Archive is compressed. Use -z option
tar: Error is not recoverable: exiting now
$ cat example.tar.bz2 | tar x
tar: Archive is compressed. Use -j option
tar: Error is not recoverable: exiting now
$ cat example.tar.xz | tar x
tar: Archive is compressed. Use -J option
tar: Error is not recoverable: exiting now
$ cat example.tar.lz | tar x
tar: Archive is compressed. Use --lzip option
tar: Error is not recoverable: exiting now
As a side note, tar clearly knows which compressor is being used, so why not just use it rather than telling the user to specify it? Interestingly the other major tar variant (bsdtar) will just handle automatic decompression without an option, even when a pipe is used.
|
|
|
09-11-2014, 08:02 AM
|
#5
|
LQ Veteran
Registered: May 2008
Posts: 7,013
|
Quote:
Originally Posted by ruario
As a side note, tar clearly knows which compressor is being used, so why not just use it rather than telling the user to specify it?
|
I think I prefer the "Hmmm, it looks like a _____ but I'd rather you confirm it" approach, even if it means more work on the part of the user.
Of course, UNIX purists would argue that tar shouldn't be doing any compression/decompression itself anyway!
|
|
|
09-11-2014, 08:59 AM
|
#6
|
Senior Member
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557
|
Quote:
Originally Posted by GazL
I think I prefer the "Hmmm, it looks like a _____ but I'd rather you confirm it" approach, even if it means more work on the part of the user.
|
Fair enough but then why do they do automatic decompression when a pipe is not used. Either do it all the time or not at all. GNU tar's way of being automatic half the time is just weird IMHO.
Quote:
Originally Posted by GazL
Of course, UNIX purists would argue that tar shouldn't be doing any compression/decompression itself anyway!
|
Yep.
|
|
|
09-11-2014, 06:32 PM
|
#7
|
LQ Newbie
Registered: Aug 2012
Location: Modena - Italy
Posts: 12
Original Poster
Rep:
|
Quote:
Originally Posted by Didier Spaier
It's hard to help if we don't know the characteristics of the file. Please provide output of following command: Also, if possible indicate the way the tarball was built, its content, and if publicly available a link to it. Bear also in mind that the tar command is generally not relevant for compressed single files.
In addition for recent versions of tar, the z option (as the j option) is generally useless as tar can "guess" the compression algorithm.
|
It's a Raspberry .img i took with command dd, anyway files are good, on the other Slackware machine (same version) it works.
Here what you asked for:
file muxPi-14-Arch.tar.gz
muxPi-14-Arch.tar.gz: gzip compressed data, from Unix, last modified: Thu Mar 20 23:15:32 2014
|
|
|
09-11-2014, 07:55 PM
|
#8
|
Moderator
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,297
|
Quote:
Originally Posted by embeddedPROJECTS
When i try to extract my tar.gz archives with tar xvzf i get:
tar: muxPi_Arch_13.img: Wrote only 2559 of 10240 bytes
Tested gzip and it works, tryed to compress and extract with zip and 7zip
the same files and they worked, reinstalled tar and updated, problem remains.
|
I have read this several times but am not sure I understand just what you mean.
Does gzip successfully open that file, but tar will not? That would mean that it was created with gzip, but not tar.
Your file output would look the same in either case I think.
So, in other words, if it opens with gzip but not tar, then use gzip, the file is misnamed as tar.gz and should be just gz. Hope that made sense.
You also said that you created it with dd. Was that dd | gzip? Can you tell us the exact command used to create it?
Last edited by astrogeek; 09-11-2014 at 07:57 PM.
|
|
|
All times are GMT -5. The time now is 12:29 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|