Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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?
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.
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')?
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.