LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   'untar'? (https://www.linuxquestions.org/questions/linux-newbie-8/untar-265005/)

stevesk 12-10-2004 04:51 PM

'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.

acid_kewpie 12-10-2004 04:58 PM

what "failed"?? please explain in more technical detail, and -xvf is the standard extract command for tar... what are you expecting it to do?

stevesk 12-10-2004 05:19 PM

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?

acid_kewpie 12-10-2004 05:29 PM

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.

stevesk 12-10-2004 05:35 PM

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')?

acid_kewpie 12-10-2004 05:37 PM

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.

stevesk 12-10-2004 05:45 PM

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?

acid_kewpie 12-10-2004 05:50 PM

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.

stevesk 12-10-2004 05:58 PM

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.

acid_kewpie 12-11-2004 04:27 AM

just edit /etc/bashrc or /etc/profile for system wide modifications

Komakino 12-11-2004 10:32 AM

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.

OhMyAchingGut 12-20-2004 06:50 PM

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


All times are GMT -5. The time now is 03:06 AM.