Removing program diretories and files with a bash script
I have a large number of PCs which have a program installed that I need to remove. The program was compiled and installed from source but the source directory was removed so I can't do a make uninstall.
I want to create a bash script that basically does a
# locate programname
and then rm -f any file or directory it returns. I know this is a little dangerous as locate might return a non-related file but I've tested on a few machines and so far it has only returned files related to my program.
Does anyone know how to accomplish this with a bash script or have ideas of a better way?
Thanks,
W
|