35 Essential Linux ‘find’ Command Examples to Master File Searching
This guide presents 35 practical Linux find command examples, organized into five sections that cover basic name searches, permission‑based queries, owner/group filters, date‑time criteria, and size‑based selections, helping users efficiently locate and manage files and directories.
Linux find command is one of the most important and frequently used commands in Linux. It searches for files and directories based on criteria such as permissions, user, group, type, date, size, and more.
This article shares 35 common find command examples, divided into five parts from basic name searches to advanced size‑based queries.
Part 1: Basic name‑based file search
Part 2: Search files by permissions
Part 3: Search files based on owner and group
Part 4: Search files and directories by date and time
Part 5: Search files and directories by size
1. Find files by name in the current directory
Search for all files named test.c in the current working directory.
2. Find files by name in the home directory
Find all files named test under the /home directory.
3. Find files by name with case‑insensitivity
Find all files named test in /home, matching both upper‑ and lower‑case letters.
4. Find directories by name
Find all directories named test under the root ( /) directory.
5. Find PHP files by name
Find all PHP files named test.PHP in the current working directory.
6. Find all PHP files in a directory
Search for all .php files inside a directory.
7. Find files with permission 777
Locate all files that have permission 777.
8. Find files without permission 777
Find all files that do not have permission 777.
9. Find SGID files with permission 644
Search for all SGID files whose permission bits are set to 644.
10. Find Sticky‑bit files with permission 551
Locate all files that have the sticky bit set and permission 551.
11. Find SUID files
Find all files with the SUID bit set.
12. Find SGID files
Find all files with the SGID bit set.
13. Find read‑only files
Locate all files that are read‑only.
14. Find executable files
Find all files that have executable permission.
15. Find 777‑permission files and chmod to 644
Find all files with permission 777 and change them to 644 using chmod.
16. Find 777‑permission directories and chmod to 755
Locate all directories with permission 777 and change them to 755.
17. Find and delete a single file
Find a file named test.c and delete it.
18. Find and delete multiple files
Find and delete multiple files such as .mp3 or .txt files.
19. Find all empty files
Search for all empty files under a specific path.
20. Find all empty directories
Archive all empty directories under a specific path.
21. Find all hidden files
Use a command to locate all hidden files.
22. Find files owned by a specific user
Find all files named test.c owned by root in the /root directory.
23. Find all files belonging to a user
Find all files under ~ that belong to user neil.
24. Find all files belonging to a group
Find all files under /home that belong to the group Developer.
25. Find specific file types for a user
Find all .txt files belonging to user neil in the ~ directory.
26. Find files modified in the last 50 days
Locate all files that were modified within the past 50 days.
27. Find files accessed in the last 50 days
Find all files that were accessed within the past 50 days.
28. Find files modified between 50 and 100 days ago
Locate files whose last modification time is older than 50 days but newer than 100 days.
29. Find files changed in the last hour
Find all files that were changed within the past hour.
30. Find files modified in the last hour
Locate all files that were modified within the past hour.
31. Find files accessed in the last hour
Find all files that were accessed within the past hour.
32. Find files larger than 50 MB
Locate all files whose size exceeds 50 MB.
33. Find files between 50 MB and 100 MB
Find all files whose size is greater than 50 MB but less than 100 MB.
34. Find and delete files larger than 100 MB
Find all files larger than 100 MB and delete them with a single command.
35. Find specific files and delete them
Find all .mp3 files larger than 10 MB and delete them with a single command.
These 35 examples cover most common uses of the find command; feel free to share any additional tips in the comments.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
