jemnotesversion 2 / featuring this entry or see all/search

Jul 29
I’ve often tried to use find, but have never really got over its syntax. It seems that it’s one of those powerful tools that’s not necessarily obvious to use at first.
Here’s one way to use it. This:
find . -name '*.sw*' -print
prints filename which have .sw in them (say, leftover vim swapfiles).
You can combine this with grepping. This:
find . -name "*.bib" -exec echo {}; grep "tribute to" '{}'
looks for the words ‘tribute to’ in files with the extension .bib.