LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-28-2003, 05:57 AM   #1
R4z0r
Member
 
Registered: Jan 2002
Distribution: CentOS 3.1
Posts: 119

Rep: Reputation: 15
Inputting a text file in to the "rm" command


Hi All,

I would like to remove all traces of a program I recently installed but no longer want, I've come up with the idea of writing a little script to do this but i've got stuck.

So far I just have:

find * / | grep $1 >> /tmp/$1.remove

Which is gives me a list of anything contating $1, all I want to do now is input that into "rm" to delete it all, what command should I use?

Thanks
 
Old 12-28-2003, 07:35 AM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Sounds dangerous


rm `find * / |grep $1`


 
Old 12-28-2003, 08:08 AM   #3
R4z0r
Member
 
Registered: Jan 2002
Distribution: CentOS 3.1
Posts: 119

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by DavidPhillips
Sounds dangerous
Indedd, is there a prefered way for removing compiled apps?
 
Old 12-28-2003, 08:29 AM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Some sources have make uninstall. I don't know if I trust that either.

Then there is RPM.
 
Old 12-28-2003, 09:51 AM   #5
slightcrazed
Member
 
Registered: May 2003
Location: Lisbon Falls, Maine
Distribution: RH 8.0, 9.0, FC2 - 4, Slack 9.0 - 10.2, Knoppix 3.4 - 4.0, LFS,
Posts: 789

Rep: Reputation: 30
If you're have a basic knowledge of makefiles (or any scripting for that matter) you can read the makefile and find the unistall info. It's usually just make install in reverse; i.e. whatever files were copied using make install are then deleted using make uninstall. I have found that most make uninstalls work fine, and if you find any problems with the makefile send an email to the author and let them know.

slight
 
Old 12-28-2003, 05:44 PM   #6
speck
Member
 
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 375

Rep: Reputation: 115Reputation: 115
In the future, you could also use CheckInstall, which will create packages in a format (compatible with Redhat, Debian, and Slackware for sure) that can be uninstalled using that particular distributions package management system.

Speck
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in man command "sh: line 1: /usr/bin/gtbl: No such file or directory" MinA Slackware 1 09-06-2004 06:36 PM
Tiny Sofa 2.0 - I thought "halt", "reboot" were only root command ?? sorcerer Linux - Distributions 1 08-21-2004 03:28 PM
remove "special" text out of a file tearinox Linux - General 1 03-15-2004 08:43 PM
"how do I extract a number from a text file using shell command?" sdandeker Linux - Networking 3 02-12-2004 08:54 AM
How can I catch some "KEY WORDS" from a text file without opening it? yuzuohong Linux - General 1 06-14-2002 09:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:02 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