Send by LINE
B! Bookmarks in Hate-bu
Bookmarks in Pocket
RSS feeds

Linux find: Search files / directories

Other language site
No available translations found
Google Translate
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

Option Contents
-type d Display directory only
-type f Display 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

 

Leave a Reply

*