Linux find: Search files / directories

Other language site
No available translations found
Google Translate
  • ---

    Send by LINE
  • -

  • -

  • -

programing image

To search for files and directories, use the find command.

There are various search methods such as specific extension, file with specific update date and time.

For now, I will only list what you often use.

I will also use it as my memorandum, so I will add it as necessary.

Search for matches with a specific pattern

-type dDisplay directory only
-type fDisplay only files
-name [pattern]Display files and directories that match the pattern

Display directory list

find -type d

Display file list

find -type f

Display files and directories that match the pattern

find -name *.log


SNS also distributes articles.
Leave a Reply


If you like this article, share it!