4 ms·
This is a brilliant idea! You can do most of the same kinds of things via find and grep and some shell foo, but honestly who can remember all of that? Maybe s
by justin_vanw 11y ago
This is a brilliant idea!
You can do most of the same kinds of things via find and grep and some shell foo, but honestly who can remember all of that? Maybe someone smarter than me, but every time I need it I am reading man pages.
The find syntax to get files modified more than 20 minutes ago? How can you remember that? But modified > now() - interval '5 minutes' (well that's postgres but still), I can remember it and I haven't used it in 2 or 3 years, because it's slightly less arbitrary and doesn't have 8 different gotchas.
EDIT:
find . -mmin -5 # that gets you files modified in the last 5 minutes. The part I can't ever remember:
find . -mmin +5 # that gives you files last modified more than 5 minutes ago
find . -mmin 5 # apparently this is files modified exactly 5 minutes ago? The fact that this syntax exists (and is different from +5) seems absurd to me. What is the resolution? It must be minutes. This option exists only to confuse people.
- enesunal 11y agomay be an alternative find . -mmin <5 # less than 5mins find . -mmin >5 # more than 5mins find . -mmin =5 # exact 5mins