find
Basic Usage
1. Look for Executable Files
2. Look for Broken Links
3. Based on Content Changes
- Explanation: Finds files that were modified in the last day.
4. Based on Metadata or Attribute Changes
- Explanation: Finds files where metadata or attributes were changed in the last two days.
5. Based on Last Accessed Time
- Explanation: Finds files that were accessed in the last day.
6. Changed in the Last Hour
- Explanation: Finds files modified within the last 60 minutes.
7. Changed Earlier than a Specific Date
- Explanation: Finds files modified after July 24, 2019.
Hardlink
Sorting and Filtering
Sort by Size
- Explanation: Finds files larger than 10 GiB.
Tip: You can use the following size suffixes: - ‘k’ for kibibytes (KiB) - ‘M’ for mebibytes (MiB) - ‘G’ for gibibytes (GiB)
Using Wildcards
-
[]
: Matches the characters that appear within the square brackets. -
*
: Matches any character sequence of any length (including none). For example:- A search for
*at
will match “cat”, “hat”, and “bat”.
- A search for
Example: Excluding Specific Characters
[!char]
: Excludes specific characters inside the square brackets.
Visual Guide
Searching Files via Permissions
Finding Files with Specific Permissions
Finding Files with SUID (Set User ID)
- Explanation: Finds files owned by the root user with SUID permissions set.