Simple question, I was wondering how I could easily delete 1 specific file throughout several subdirectories without having to type rm <filename> in each subdirectorie. I tried rm -r Makefile-noedit from the top level and it just says Makefile-noedit : No such file or directory. if I got to each subdirectory and do rm Makefile-noedit it works. Thanks, Paul -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Paul Zimdars wrote:
I was wondering how I could easily delete 1 specific file throughout several subdirectories without having to type rm <filename> in each subdirectorie.
I tried rm -r Makefile-noedit from the top level and it just says Makefile-noedit : No such file or directory.
if I got to each subdirectory and do rm Makefile-noedit it works.
Try: find <dir> -name <filename> -exec rm {} \: Paul Abrahams -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Thanks.. it worked out by just replacing a : with a ; at the end of that statement. Paul On Mon, 13 Mar 2000, Paul W. Abrahams wrote:
Paul Zimdars wrote:
I was wondering how I could easily delete 1 specific file throughout several subdirectories without having to type rm <filename> in each subdirectorie.
I tried rm -r Makefile-noedit from the top level and it just says Makefile-noedit : No such file or directory.
if I got to each subdirectory and do rm Makefile-noedit it works.
Try:
find <dir> -name <filename> -exec rm {} \:
Paul Abrahams
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
find . -type f -name 'Makefile-noedit' -exec rm -f '{}' \;
That will remove all files named Makefile-noedit from the current directory
and below.
Check out the manpage on find.
----- Original Message -----
From: "Paul Zimdars"
Simple question,
I was wondering how I could easily delete 1 specific file throughout several subdirectories without having to type rm <filename> in each subdirectorie.
I tried rm -r Makefile-noedit from the top level and it just says Makefile-noedit : No such file or directory.
if I got to each subdirectory and do rm Makefile-noedit it works.
Thanks,
Paul
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Paul Zimdars wrote:
Simple question,
I was wondering how I could easily delete 1 specific file throughout several subdirectories without having to type rm <filename> in each subdirectorie.
I tried rm -r Makefile-noedit from the top level and it just says Makefile-noedit : No such file or directory.
if I got to each subdirectory and do rm Makefile-noedit it works.
Hi, use the "find" utility. I allows you to search for file(s) and run arbitary commands on them. I'm not able to give you a working solution (I'm lazy), but you should be able to come up with one. :) -- Nadeem :) http://www.nadmm.com/ -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (4)
-
abrahams@valinet.com
-
keith@HaggleWare.com
-
nhasan@usa.net
-
pzimdars@Zerg.CrazyFOO.orG