Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-15-2005, 03:05 AM   #1
Registered: Jan 2004
Location: New Zealand
Distribution: Mint | Sabayon
Posts: 155

Rep: Reputation: 15
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.
Old 09-15-2005, 03:17 AM   #2
Senior Member
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
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

Old 09-15-2005, 10:21 AM   #3
Registered: Jan 2004
Location: New Zealand
Distribution: Mint | Sabayon
Posts: 155

Original Poster
Rep: Reputation: 15
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.
Old 09-15-2005, 10:57 AM   #4
Senior Member
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 63
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.

Old 09-15-2005, 04:25 PM   #5
Senior Member
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
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)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help installing tarballs nationofcass Linux - Software 2 02-15-2005 11:13 PM
Installing software from tarballs NomadABC Linux - Software 4 02-01-2005 03:11 PM
file/dir structure xemous Linux - Newbie 3 10-04-2004 02:51 AM
Tarballs installing questions Focalpoint Linux - Newbie 7 07-06-2004 08:51 PM
Compiling/Installing Tarballs on Redhat vinaypai Linux - General 2 11-17-2001 11:19 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:21 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration