LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Quick guide on tar (https://www.linuxquestions.org/questions/linux-newbie-8/quick-guide-on-tar-282540/)

bograt 01-26-2005 01:34 PM

Quick guide on tar
 
As a newbee used to zip & rar I understandably don't have a real clue how to run / install
tar files etc It appears that if I download rpm's I am given the option of instslling using yast
but I have probs with tar files etc.

Please advise on how to do it in ideot speak.

unnamedman 01-26-2005 01:36 PM

I'll be happy too if you answer this question. I'm newbiea as you man. :)

csfalcon 01-26-2005 01:42 PM

things in rpm are already nicely packaged binary and can be installed on the system with the command
Code:

rpm -ivh <filename>.rpm
tar files usually contains the source files, which you need to compiled on your system and then installed.

to "unzip" a tar file:

if the file ends with ".tar" use:
Code:

tar xvf <filename>.tar
if the file ends with ".tar.gz" use:
Code:

tar xvzf <filename>.tar.gz
After you "unzip", look for the README file on how to compile or install the package.

__J 01-26-2005 01:43 PM

generally speaking, ( this is not always the case ), tar files are source archives. To install them, you have to extract them (we'll get to this in a minute) and build them with your system's compiler. To extract a tar file, you need to know how it was compressed. You can tell this by what extension the file has. The two most common methods is gzip (which will end in tar.gz) and bzip2 (which will end in tar.bz2).
for a gzip compressed archive:

Code:

tar -zxvf tarfile.tar.gz
will extract the contents

for a bzip2 compressed file:

Code:

tar -xvfjp tarfile.tar.bz2
will extract the contents.

The actual steps involved in building vary from package to package but in the most basic form ( I stress basic here):

./configure
make
make install

But keep in mind you kinda need to know what your doing if your upgrading libraries or the application needs to link against libraries installed on your system ( This is distribution specific, some require more steps than others).

if you use gnome/kde, then file-roller/ark will uncompress the archives for you also.

bograt 01-26-2005 01:44 PM

Quote:

Originally posted by unnamedman
I'll be happy too if you answer this question. I'm newbiea as you man. :)
:) :) :)

Isn't it hard getting straight answers on this forum??????? you get so many varying answers you don't know where to turn.

It would be nice just to be able to download something and extract / run it like you can with win zip etc.

My heads cabaged with the tar stuff and even though yast can be used to run rpm's sometimes you dont know where it's installed it to so even though a file is on your system you can't find it. Arrrrrrrrrrrr:confused::) :) :)

Tinkster 01-26-2005 01:52 PM

http://www.linuxquestions.org/questi...threadid=45094

Look at the top two sticky threads in Linux-General :)


Cheers,
Tink

Tinkster 01-26-2005 01:55 PM

Quote:

Originally posted by bograt
Isn't it hard getting straight answers on this forum???????
I suppose it's about as hard as to use the search engine
we provide for your convenience...



Cheers,
Tink

bograt 01-26-2005 01:59 PM

I suppose this needs to be done as root? This part I am aware of and in fact I have found you can extract to a folder then you look for the install file for the info but I get lost then. I'm trying to install an antivirus. I went to root found the directory & typed what was written it said the library file was not loaded and I tried to do this but got lost. In the install file it said do x y & z and follow instructions but didn't get that far.

bograt 01-26-2005 02:02 PM

Quote:

Originally posted by Tinkster
I suppose it's about as hard as to use the search engine
we provide for your convenience...


Cheers,
Tink

[mod_edit]
Sorry if I offended you it wasn't meant as a snipe. theres just so much info that finding the info that is what you need is tricky.

Sorry again thanks will check the link
[/mod_edit]


dylbyrt45 01-26-2005 08:48 PM

You might also want to try using pinfo from the CLI, I find it easier to understand than the man pages.

yourprompt>pinfo tar

bograt 01-27-2005 10:56 AM

Quote:

Originally posted by dylbyrt45
You might also want to try using pinfo from the CLI, I find it easier to understand than the man pages.

yourprompt>pinfo tar

Thanks! I tried for ages to run some programs from the root ( command ) but got absolutely no where. would have pulled my hair out if I had any:) I'm one of these people who needs to be shown a task to learn it and whilst I have checked the info from the link above when I get to the directory a install file is in I get messages saying no such file if I dir it shows up but cant get to it Anyway won't go on will try and struggle through and you never know the light may come on at least I can use yast to install most RPM's though. but thats a bit restrictive.

Thanks for everyones advice.

:newbie: :Pengy:

darkRoom 01-27-2005 05:15 PM

If you have a problem with a command consult the man pages ie 'man tar', thats as straight an answer as you'll get


All times are GMT -5. The time now is 07:46 PM.