This guide explains how to use the find command in Linux to locate files based on various criteria.
In this guide, you’ll learn how to quickly locate files on a Linux system using the powerful find command. Whether you need to hunt down large log files, uncover recently modified documents, or filter by permissions, find provides flexible options to suit your needs.By default, files on Linux are organized under standard directories:
SSH daemon configurations: /etc/ssh
System logs: /var/log
However, there are many scenarios where you must perform an arbitrary search:
Locate all image files beneath your web directory
Identify huge files when disk space is low
List files modified or created within a specific timeframe
Below, we cover the most common use cases with examples.
# Search by name under /usr/share for JPEG filesfind /usr/share/ -name '*.jpg'# Find files larger than 10 MB in /lib64find /lib64/ -size +10M# List files modified in the last minute under /devfind /dev/ -mmin -1
find -perm 664 # exactly 664find -perm -664 # at least these bitsfind -perm /664 # any of these bits
More permission filters:
Copy
Ask AI
find -perm 600 # owner read/write onlyfind -perm -100 # owner has executefind \! -perm -o=r # not readable by othersfind -perm /u=r,g=r,o=r # readable by user OR group OR others
Be careful to quote wildcard patterns (e.g., "*.txt"), especially when running in scripts or complex shells.