Loonhaunt
Posts: 55
Joined: Sat Nov 16, 2013 5:13 am

Unzipping tar.gz files

Sat Feb 01, 2014 9:41 pm

Hello I am trying to unzip a downloaded file ftdi_sio.tar.gz
I have used these option that I got from a comment somewhere:
tar xvf ftdi_sio.tar.gz
tar ftdi_sio.tar.gz
tar xvzf ftdi_sio.tar.gz
return"tar: Child returned status 1
tar: error isn not recoverable: exiting now"

Thanks much, pretty new to linux and command line file operation

Dave

User avatar
DeeJay
Posts: 2027
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK

Re: Unzipping tar.gz files

Sat Feb 01, 2014 10:05 pm

Looking at http://www.ftdichip.com/Drivers/VCP.htm, there does not seem to be a driver for the ARM architecture in the RPi. Are you sure the driver you are trying to install is appropriate for your operating system?

If you are determined to proceed, try using gunzip to unpack the .gz archive, and then tar to extract the files from the resulting tar file.
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

Loonhaunt
Posts: 55
Joined: Sat Nov 16, 2013 5:13 am

Re: Unzipping tar.gz files

Sun Feb 02, 2014 2:46 am

Hmm.

If that is the case what does one use to control an ftdi(the lack of ARM) chip with the raspberry pi and consequently talk to an xBee?

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Unzipping tar.gz files

Sun Feb 02, 2014 6:18 am

Cannot answer your question about controlling that device but, just for the record, if you want to unzip a gzip file, you would use gunzip.

gunzip filename.gz


and if it is a tar.gz file, I do it the long way instead of getting fancy with options:

gunzip filename.tar.gz
tar xvf filename.tar
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

User avatar
rpdom
Posts: 15577
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Unzipping tar.gz files

Sun Feb 02, 2014 7:23 am

If you are using Raspbian, the ftdi_sio driver is already installed. It is a module called (not surprisingly) ftdi_sio.ko

It should get automatically loaded when you plug the device in to the USB port.

In Linux most (but not all) of the drivers you will need are either built in to the kernel or available as modules which will either be automatically loaded when the device is detected or have to be told to be loaded.

It has been a long time since I've needed to install any other drivers and in that case it was a case of downloading source, making a few tweaks for the unusual device I was using (PCMCIA floppy drive), compiling and installing.

User avatar
DougieLawson
Posts: 36544
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Unzipping tar.gz files

Sun Feb 02, 2014 9:14 pm

Why not use the simple options

If it's tar.bz2 then use tar -xjvf filename.tar.bz2
If it's tar.gz then use tar -xzvf filename.tar.gz
if it's tgz then use tar -xzvf filename.tgz

In each case tar runs the appropriate unzip program and pipes the output into tar.

-x means extract
-v mean list things as they're untarred (can be a bit noisy on a large tarball).
-f gives the filename for input
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Loonhaunt
Posts: 55
Joined: Sat Nov 16, 2013 5:13 am

Re: Unzipping tar.gz files

Sun Feb 02, 2014 9:30 pm

So I did everyone of those letter for letter and each one returned a different error message. With that I am guessing the something did not work with the download. However if I just unzip the file using the file manager in startx I can see the four files and they have mass so I don't know what could be missing.

DB
DougieLawson wrote:Why not use the simple options

If it's tar.bz2 then use tar -xjvf filename.tar.bz2
If it's tar.gz then use tar -xzvf filename.tar.gz
if it's tgz then use tar -xzvf filename.tgz

In each case tar runs the appropriate unzip program and pipes the output into tar.

-x means extract
-v mean list things as they're untarred (can be a bit noisy on a large tarball).
-f gives the filename for input

gkreidl
Posts: 6131
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Unzipping tar.gz files

Sun Feb 02, 2014 10:07 pm

Loonhaunt wrote:So I did everyone of those letter for letter and each one returned a different error message. With that I am guessing the something did not work with the download. However if I just unzip the file using the file manager in startx I can see the four files and they have mass so I don't know what could be missing.
If your own quote was right, you didn't have the "-" in front of the options string.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Loonhaunt
Posts: 55
Joined: Sat Nov 16, 2013 5:13 am

Re: Unzipping tar.gz files

Sun Feb 02, 2014 10:36 pm

Yes but did the whole run of experiments over again with the - . Still got the same results.

Dave

User avatar
jojopi
Posts: 3085
Joined: Tue Oct 11, 2011 8:38 pm

Re: Unzipping tar.gz files

Sun Feb 02, 2014 11:37 pm

The "-" is optional for tar options. (More correctly, either the standard option syntax or the historic bundled form are accepted. In bundled form, all the characters of the first argument are options, and all the values for the options come in later arguments. In option form, options can come anywhere, but values must immediately follow their options. So "tar fx file.tar" works, whereas "tar -fx file.tar" mistakes "x" as the filename for "-f".)

The error message in the original post is incomplete, but most likely the file was not downloaded correctly. The only other reason for the third command to fail is if gzip is broken on the system.
DougieLawson wrote:If it's tar.bz2 then use tar -xjvf filename.tar.bz2
If it's tar.gz then use tar -xzvf filename.tar.gz
In recent versions you can use "tar -xavf" to autodetect the compression based on the extension. This avoids the need to remember that there is also -J for .xz and -Z for .Z, and several others.

User avatar
DougieLawson
Posts: 36544
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Unzipping tar.gz files

Sun Feb 02, 2014 11:40 pm

jojopi wrote:In recent versions you can use "tar -xavf" to autodetect the compression based on the extension. This avoids the need to remember that there is also -J for .xz and -Z for .Z, and several others.
Thanks for sharing that. I now have to retrain my fingers to type an 'a' where a 'j', 'J', 'z' or 'Z' belongs.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Loonhaunt
Posts: 55
Joined: Sat Nov 16, 2013 5:13 am

Re: Unzipping tar.gz files

Mon Feb 03, 2014 1:53 am

jojopi wrote:The "-" is optional for tar options. (More correctly, either the standard option syntax or the historic bundled form are accepted. In bundled form, all the characters of the first argument are options, and all the values for the options come in later arguments. In option form, options can come anywhere, but values must immediately follow their options. So "tar fx file.tar" works, whereas "tar -fx file.tar" mistakes "x" as the filename for "-f".)

The error message in the original post is incomplete, but most likely the file was not downloaded correctly. The only other reason for the third command to fail is if gzip is broken on the system.
DougieLawson wrote:If it's tar.bz2 then use tar -xjvf filename.tar.bz2
If it's tar.gz then use tar -xzvf filename.tar.gz
In recent versions you can use "tar -xavf" to autodetect the compression based on the extension. This avoids the need to remember that there is also -J for .xz and -Z for .Z, and several others.
My suspicion is that the download did not go well.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6074
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Unzipping tar.gz files

Mon Feb 03, 2014 5:24 am

Strange, I've been using

Code: Select all

tar xvf file
for a very long time for any archived tar file without specifying any additional flags without any problems.

Loonhaunt
Posts: 55
Joined: Sat Nov 16, 2013 5:13 am

Re: Unzipping tar.gz files

Mon Feb 03, 2014 1:47 pm

I have to try that one. I will report back later.

User avatar
jojopi
Posts: 3085
Joined: Tue Oct 11, 2011 8:38 pm

Re: Unzipping tar.gz files

Mon Feb 03, 2014 3:22 pm

ShiftPlusOne wrote:tar xvf file
Oh wow! That behaviour is fully documented and actually predates --auto-compress.

So you only need -a when creating archives, and you only need -z -j -J when dealing with pipes.

Return to “Beginners”