Skip to main content
1 of 2
Torin
  • 1.8k
  • 1
  • 11
  • 17

The find utility supports the option -maxdepth

-maxdepth levels
Descend at most levels (a non-negative integer) levels of directories below the starting-points. -maxdepth 0 means only apply the tests and actions to the starting-points themselves.

To restrict find to the specified directory, you can add the option -maxdepth 1.

Torin
  • 1.8k
  • 1
  • 11
  • 17