Published on

Today I Learnt: Find files with find

Authors
  • Mehdi Akiki avatar
    Name
    Mehdi Akiki
    Twitter

Find files by name:

find . -name "*.log"

Find and delete empty files:

find . -type f -empty -delete

Tip: combine with -exec or -print0 | xargs -0 for safe handling of spaces.

title: "Today I Learnt: Find files with find" date: "2025-09-16" tags: ["bash", "til"] draft: false summary: "Search for files by name or type."


Find files named 'config.json' from current dir:

find . -type f -name 'config.json'

I build and scale reliable production systems. Open to full-time and freelance work with U.S.-based teams that value ownership and execution.

Got something in mind?

Book a Discovery Call