Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!

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.

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.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

But that is an outdated and incomplete man page and does not show all the options (look at 'tar --help' on your distro and see the 'Compression options' section or look at GNU tar's info page, or at the 8.1.1 Creating and Reading Compressed Archives section of the online GNU tar HTML manual). Modern versions of GNU tar (from 1.20, which was released on 2008-04-14 and all subsequent versions) do indeed support the 'a' flag to automatically decide on what compressor to use based on file extension. That said, 'a' is only supposed to used for compression, GNU tar will automatically use the right decompressor based on extension (and/or magic number) in any case (that feature was added in 1.15, back in 2004-12-20), hence there is no need for either 'j' or 'a' in decompression examples (or '-' to specify flags for that matter).

You can decompress bzip2 compressed files as simply as the following if using a GNU tar from the last 8 years (this is also true for recent versions of BSD tar based on libarchive):

Code:

tar xf file.tar.bz2

If you are using some other tar variant the way that will always work is:

Regarding the IPK files, they are archived and compressed debian packages meant to be used on embedded systems with limited storage capacity. Usually the archives were created using ar (not tar) so that you can try to list or extract their content using

Actually, although based on deb file format the outer container is not ar (like deb) but a gzipped tar, e.g. inspect the following ipkg-opt_0.99.163-10_arm.ipk.

So to extract the contents you would actually do the following:

Code:

tar xf filename.ipk

To the OP, installing it is another matter and would only be appropriate if you use a system that actually uses .ipk files. What are you actually trying to install, what are you trying to achieve by doing this and what is your distro?

If all else fails, when trying to extract from some archive you know little about I would try installing BSD Tar (it is readily available on most distros) and using that. It uses libarchive and can extract from a wide range of formats, tar, cpio, ar, zip, rpm, ISO_9660, etc. and automatically detects a variety of compression methods. It supports most of the same command line options as GNU tar. So to inspect the contents of an archive:

Code:

bsdtar tf archive

For a more detailed overview with a summary showing archive format and compression at the end:

Code:

bsdtar tvvf archive

Or to extract

Code:

bsdtar xf archive

If this doesn't work you could always try to gather more information about what the file actually is using the file command:

Code:

file archive

and if that doesn't work search on the internet using the file extension as one of your keywords.

That all said, when asking questions it is better to include what your 'end goal' is as it may allow someone to suggest an alternative method to achieve what you desire.

EDIT: I only just realised this was a dead thread that was resurrected by baloon68. Sorry about that!

Last edited by ruario; 03-06-2013 at 04:56 AM.
Reason: Added comment about this being an old thread; changed tar to bsdtar in examples