LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Installing tarballs with dir structure (https://www.linuxquestions.org/questions/linux-software-2/installing-tarballs-with-dir-structure-363516/)

smudge|lala 09-15-2005 02:05 AM

Installing tarballs with dir structure
 
I have a couple of tarballs and gnuzip tarballs to install. 'Inside' the tarball is the full directory structure of the program with it's usr, doc, bin, etc files.

How do I install these files without # mv them to all the correct directories? They just need to be dropped into place, but I wondered if one command might save 20 mins of laborious # mv. Thanks.

hw-tph 09-15-2005 02:17 AM

Check the structure of them. If the binaries are in, say, /usr/bin you should untar it to the root of your filesystem, but if they are located in /bin you should consider untarring the tarball to /usr (so they end up in /usr/bin) or perhaps more appropriate, /usr/local (so they end up in /usr/local/bin). Another option is untarring to /opt: cd /opt && tar xfvz ~/filename.tar.gz


Håkan

smudge|lala 09-15-2005 09:21 AM

Thanks for your reply. I shall need to check that the directory structure is the same as my distro, but untarring will just untar the files into the relevant directories, not overwrite them? This was my concern.. that I might wipe out /usr for example with a directory with only a few files in it. Thanks.

theYinYeti 09-15-2005 09:57 AM

tar won't wipe out previous structure and files. However, tar will silently overwrite an existing file if another file with the same name is in the same path in the tar.

You may be interested in my article:
My site > Computing > Linux > software/install.

Yves.

Komakino 09-15-2005 03:25 PM

I think you've possibly downloaded slackware packages. Slack packs take the form of a tgz (or tar.gz) file that contains a directory structure and some script to install any little bits and pieces (create files in certain places or change permissions etc)


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