LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 12-10-2004, 04:51 PM   #1
stevesk
Member
 
Registered: Dec 2004
Distribution: Slackware-current
Posts: 207

Rep: Reputation: 30
'untar'?


Hello people!

Well, I was trying to install a package, and so I extracted it under my root dir. I saw it created dirs like /usr, /usr/share, etc. and I saw no installation in the dependences so I decided to extract from the root dir '/' (tar -xvf package.tar). It was a package optimized to my system but the software failed and I would like to find a way to 'untar', like, I give the command using the .tar file to instead of install, remove all the packages and files it installed when I extracted. Can I do this?

Thanks for the attention.
 
Old 12-10-2004, 04:58 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
what "failed"?? please explain in more technical detail, and -xvf is the standard extract command for tar... what are you expecting it to do?
 
Old 12-10-2004, 05:19 PM   #3
stevesk
Member
 
Registered: Dec 2004
Distribution: Slackware-current
Posts: 207

Original Poster
Rep: Reputation: 30
Well, thanks for answering...I would like that it instead of extracting the files of a .tar file, it seeks all the dependences and files that the .tar would be extracted to and delete them.

Like, I tar -xvf a program for a mistake from the '/' dir and it extracted many files to my /usr, /lib, etc. dirs and I would like to remove all the files it extracted. Remove all the things that tar has extracted from this package. Isn't there a way for that?
 
Old 12-10-2004, 05:29 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
this is totally beyond the scope of what tar is meant to be able to do. tar is not a package management system, just a compression programme. You wouldn't expect winzip to do this would you?

you could potentially do something like...
Code:
tar -tf file.tar | xargs -i rm /{}
but i've never tried to do that, and just in general.. that's horrible, even though it'd probably work.
 
Old 12-10-2004, 05:35 PM   #5
stevesk
Member
 
Registered: Dec 2004
Distribution: Slackware-current
Posts: 207

Original Poster
Rep: Reputation: 30
hmmm thanks...well I don't expect winzip do this for me, is that just linux is the best . But ok...so the only thing to do really is prevent mistakes backuping the system before trying to install any package directly from 'tar' (packages you need to extract from the '/' because they don't have any 'make' or 'make install')?
 
Old 12-10-2004, 05:37 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
what is this package? i've NEVER come across one that you just slap stright onto your filesystem... as you now know.. that's just horrible.
 
Old 12-10-2004, 05:45 PM   #7
stevesk
Member
 
Registered: Dec 2004
Distribution: Slackware-current
Posts: 207

Original Poster
Rep: Reputation: 30
well, it is a wine one. Wine MADE for my dist (slackware 10.0). When I tried to run it, it gave me a lot of errors. I have tried to extract it under my root dir but I saw it creating dirs like /usr, /usr/bin, /usr/share, etc. so I saw I should extract from the '/'. I don't know the errors anymore because I have reinstalled my Linux when it happened, I am asking now to know if I could have done another thing. Just backuped the system before do that, is the only thing?
 
Old 12-10-2004, 05:50 PM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you should be able to place it somewhere else e.g use /usr/local/wine/ as a base instead of /

for example i added ntop to my dedicated ipcop firewall machine:

/usr/ntop/usr/bin
/usr/ntop/usr/lib
/usr/ntop/etc

and just added those to my $path variable.
 
Old 12-10-2004, 05:58 PM   #9
stevesk
Member
 
Registered: Dec 2004
Distribution: Slackware-current
Posts: 207

Original Poster
Rep: Reputation: 30
hmmm right...can you just give me a a link to a guide about how to add dirs to someone's PATH? (like, root path, a user path, everyone's path, etc.) Thanks.
 
Old 12-11-2004, 04:27 AM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
just edit /etc/bashrc or /etc/profile for system wide modifications
 
Old 12-11-2004, 10:32 AM   #11
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
OK, your problem is that a slackware package ending in tgz isn't just a normal tar file! You're supposed to install them using the installpkg command as root:
Code:
installpkg pkgname.tgz
or run pkgtool and select to install that particular package. Slackware tgz packages contain install (and uninstall) scripts as well as being compressed files.
 
Old 12-20-2004, 06:50 PM   #12
OhMyAchingGut
Member
 
Registered: May 2004
Location: Ohio
Distribution: Slackware-current/10.1/10.0, Splack 10, Suse 9.2, NetBSD 2.0, OpenBSD 3.6, Solaris 8
Posts: 85

Rep: Reputation: 15
actually, you should be able to extract and compile any slackware package if you choose. you just generally want to installpkg.
 
  


Reply



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
Untar Dharma_bum07 Linux - Newbie 2 11-26-2004 10:16 AM
how to untar a .bz2? mjl3434 Linux - Software 3 09-09-2004 10:58 AM
can't untar... spotass Linux - Newbie 4 05-29-2004 12:41 PM
Untar to a directory john8675309 Linux - Software 2 03-14-2004 09:12 PM
untar imsajjadali Red Hat 3 01-29-2004 01:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:18 AM.

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