Why on Earth one wants a blog if he can’t write down there that damn command that you always forgot (either entirely, or when it comes to some syntax detail, or parameter ordering, or …) ?
So, here we are, the fist post of this kind, a.k.a.:
How to remove all those .rej and .orig files, resulting from days of applying and rebasing patches, that are cluttering the output of your grep-s with stale content?
well, like this:
$ find . \( -name *.rej -or -name *.orig \) -exec rm -f {} \;
Yes, this was a really easy one, but everyone I try to remember it, that damn \; always drive me crazy. Well, not anymore (o so I hope).










Thanks for this!
BTW, I usually do something like:
$ find . -name *.rej | xargs rm
Cheers!
Mmm… A lot better, mainly because it’s shorter (and thus easier to remember), and also more “Unix style”, as it takes advantage different programs connected by ‘|’-s etc., etc., etc. Personally, I hate xargs. Really, I truly and deeply hate it… But I understand that’s something irrational about me, so yeah, go ahead with that and thanks for sharing!