Linux find: Search files / directories

Other language site
ja ja
Google Translate
  • -

    シェア
  • ---

    LINEで送る
  • -

    はてなブックマーク
    ブックマーク
  • -

    pocket
  • -

    rss
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

OptionContents
-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!