Skip to content

find

The find command is used to search and locate the list of files and directories based on conditions you specify for files that match the arguments.

  • Simple find command (find a file in current directory)
Bash
find . -name kafana.md
  • Find all the files under /home directory with the name kafana.md.
Bash
find /home -name kafana.md

Examples

  • Find files and remove everything except .gz
Bash
find . -type f -not -name '*.gz'-delete
Back to top