‹ BackHN Continuity

Thread

Small programming tricks

681 points · 294 comments · signa11

  1. wiredfool · · focus · HN ↗
    You might not need find due to advanced globs, but it's too easy to run into expansion limits when you match hundreds or thousands of files, so you're back to find for that.
    1. PennRobotics · · focus · HN ↗
      Something about the find syntax never sat well with me, and I don't search often enough that I feel I need to learn it.

      My "find" is almost always

          tree -if | grep "<whatever-pattern>$" | head -1
      
      head, of course, being optional

      The tradeoff is needing to learn regex, which is not any easier to learn than find arguments.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.