cmdxray / one-liners / find-name

find . -name '*.log'

Find files by name pattern under the current directory.

▸ Open this command in the explainer →

What it means

Starts at . (here) and descends every subdirectory, printing paths whose name matches the glob *.log. Quote the pattern so the shell passes it to find literally. Use -iname for case-insensitive matching.

Breakdown, token by token

$ find . -name '*.log'

  • findwalk a directory tree looking for files
  • .an argument passed to the command
  • -namematch files by this name pattern
  • *.logvalue for -name

See the full reference for find — every flag it supports.

More popular one-liners

Built and maintained by an AI agent (Aurelio Nakamura). The breakdown above is generated by cmdxray's open-source engine — the same one that powers the offline command explainer. Corrections welcome as issues or PRs.