LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I unzip and run a .tar.gz (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-unzip-and-run-a-tar-gz-475635/)

YankeeFan 08-20-2006 11:46 AM

How do I unzip and run a .tar.gz
 
Gentle folk--
I am a newbie to linux. I would like to download and run gFTP. I have never dealt with a file.tar.gz before and I can't seem to find any "Simple English" tutorials on what to do.

If anyone can point me to a tutorial for compressing and uncompressing, and running zip files, please do.

I have downloaded a zip file: gftp-2.0.18.tar.gz in my mydownloads folder.

I do not know how to unzip it.
I do not know where to unzip it to. Is there a place in linux file system that this gftp file should be placed?

Once I unzip it, how do I install it and run it? Comming from Windows, I'm used to running exe's and having them do most of the work as far as where to install files and such.s this fairly the same in Linux?

Thanks for any help.
JohnC

perfect_circle 08-20-2006 11:55 AM

Code:

tar -xvzf gftp-2.0.18.tar.gz

J.W. 08-20-2006 11:55 AM

Welcome to the 5 step dance
Code:

tar -xvzf <package>.tar.gz
cd <directory>
./configure
make
make install

Substitute the package name for "<package">. The "tar" command will unzip the package and create a subdirectory. Use "cd" to go to that subdirectory (which will be named the same as the package) then run ./config, make, and make install.

One useful guide is http://www.tuxfiles.org/linuxhelp/softinstall.html and you can also use the man pages. Good luck with it

MensaWater 08-20-2006 11:57 AM

Any file with a .gz extension should be a gzip compressed file. To uncompress (unzip) such a file just type "gunzip <file>". This will put the file with the same name less the .gz extension in the same location. It doesn't unbundle the tar. You need to make sure you have plenty of room in the directory to be sure it will fit after it is expanded. Once you've expanded there will no longer be a .gz file.

To extract (unbundle) files with a .tar extension the command is:
tar xvf <file>. Prior to doing that though you should run tar tvf <file>. The x does the extract. The t just shows you the table of contents so you'll know what it would extract.

The site for where you got the app should tell you where it needs to be. This may just contains some rpm files that need to be installed. It depends a lot on what it has.

You didn't list your distro so there may be a better way to get gftp depending on what it is (yum, yast, up2date, apt-get).

Centinul 08-20-2006 11:57 AM

Well first off you should run the following command
Code:

man tar
This should give you the instructions on how to unzip the tar.gz file and how to place it in a certain directory. It is a very worthwhile man page to read. Secondly about the install process there should either be a README in the files that you unzipped or install instructions on the site of the program that you downloaded. Typically you don't have to place the files in the correct location right when you unzip it. The install process usually takes care of that. I would just hunt around for installation instructions on your program and you should be all set. Hope this helps.

pixellany 08-20-2006 12:40 PM

Quote:

Originally Posted by J.W.
Welcome to the 5 step dance
Code:

tar -xvzf <package>.tar.gz
cd <directory>
./configure
make
make install

Substitute the package name for "<package">. The "tar" command will unzip the package and create a subdirectory. Use "cd" to go to that subdirectory (which will be named the same as the package) then run ./config, make, and make install.

One useful guide is http://www.tuxfiles.org/linuxhelp/softinstall.html and you can also use the man pages. Good luck with it

XXX.tar.gz does not always lead to configure_make_makeinstall. Sometimes it leads to an install script, or simply "rpm -i xxx.rpm"

tar, gz, bz2, tgz etc are all file extensions that tell you how a package is compressed and archived. Once the files are extracted, there are any number of things that you might have to do next.

YankeeFan 08-20-2006 01:04 PM

unzipping and running .tar.gz
 
Thanks to all. I got it now. I figured it would be easy, but I just couldn't find how to do it.

I now have to install a GTK+ 2.0. I did a find -name GTK and nothing came up.

Thanks again, I'm on my way...

YankeeFan

perfect_circle 08-20-2006 01:23 PM

what distro are you using?

J.W. 08-20-2006 06:41 PM

Quote:

Originally Posted by pixellany
XXX.tar.gz does not always lead to configure_make_makeinstall. Sometimes it leads to an install script, or simply "rpm -i xxx.rpm"

tar, gz, bz2, tgz etc are all file extensions that tell you how a package is compressed and archived. Once the files are extracted, there are any number of things that you might have to do next.

You are correct, but my post was more intended to be a generic reponse to the question asked in the thread title than as a sure-fire solution to one specific scenario. Granted, the typical 5 step routine may not be a universal, 100% guaranteed solution to installing a .tar.gz package, but IMHO I'd say it's definitely the expected solution.

In any event, congrats YankeeFan on solving the problem and thanks for posting back with the followup.

MensaWater 08-21-2006 02:39 PM

Quote:

Originally Posted by YankeeFan
Thanks to all. I got it now. I figured it would be easy, but I just couldn't find how to do it.

I now have to install a GTK+ 2.0. I did a find -name GTK and nothing came up.

Thanks again, I'm on my way...

YankeeFan

You really need to tell us what distro you're running. While the find command has a lot of uses it won't "find" things by package name unless the package name happens to be in the file or directory name.

For distro like RedHat/Fedora you'd be much better off doing:

rpm -qa |grep -i gtk

The rpm -qa shows all packages installed and the grep -i gtk says to look for gtk case insensitive (gtk, GTK, gTK ec...). Remember in Linux/UNIX everything is case sensitive. If you had a billion files with "gtk" as opposed to "GTK" in their names find would locate them without the -icase (ingore case) flag.


All times are GMT -5. The time now is 12:16 PM.