i want to find every log file named 'justjoe_log', on an apache server. I want to delete them all. how do i do it ?
+2
A:
locate justjoe_log|xargs rm -rf
You may want to just do locate first to avoid deleting data unintentionally.
Matthew Flaschen
2010-03-25 05:26:30
+1 I was unaware of "locate" (I would have used "find").
Amit Kumar
2010-03-25 05:30:33
Yes, locate is *much* faster, but it relies on indexing so it doesn't reflect changes since the last `updatedb` run.
Matthew Flaschen
2010-03-25 05:32:21
which is typically run daily or weekly so it isn't often very up to date. nice comment!
Michael
2010-03-25 06:31:07