Skip to content

Instantly share code, notes, and snippets.

@rohitfarmer
Created July 25, 2023 14:51
Show Gist options
  • Save rohitfarmer/7b4978962274aad61911665a3cabe7fa to your computer and use it in GitHub Desktop.
Save rohitfarmer/7b4978962274aad61911665a3cabe7fa to your computer and use it in GitHub Desktop.
Find files in Linux

Find files recursively in the current folder

The commands below will produce a list of folder paths that contains the searched files.

find . -name "filename"

Note: replace . with the path to the folder if it's not the current folder.

Find files recursively in the current folder with a keyword in the file name

The commands below will produce a list of folder paths that contains the searched files.

Case sensitive keyword

find . -type f -name "*keyword*"

Note: replace . with the path to the folder if it's not the current folder.

Case insensitive keyword

find . -type f -iname "*keyword*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment