find — Advanced Usagefind [location] [criteria]
| Option | Behavior | Wildcard needs quotes? |
|---|---|---|
-name |
Case-sensitive exact match | Yes |
-iname |
Case-insensitive | Yes |
find /mywork -name "file2G" # exact, case-sensitive
find /mywork -iname "file*" # case-insensitive, any name starting with "file"
find /mywork -iname "File*" -type d # directories starting with "file" (any case)
find /mywork -iname "file*" -type f # files starting with "file" (any case)
"file*" not file*.iname accepts uppercase or lowercase without affecting results.find /mywork -type f # regular files only
find /mywork -type d # directories only
find /mywork -type l # symbolic (soft) links
find /dev -type c # character devices (e.g., TTY)
find /dev -type b # block devices (e.g., disks)
File type letters:
| Letter | Type |
|---|---|
f |
Regular file |
d |
Directory |
l |
Symbolic link |
c |
Character device |
b |
Block device |
Note: /dev contains only character devices, block devices, and symbolic links — no regular files.
find /mywork -size 10M # exactly 10 megabytes
find /mywork -size +2M # larger than 2 megabytes
find /mywork -size -1G # smaller than 1 gigabyte
find /mywork -size +10M -type f # files larger than 10MB only
find /mywork -size 2G # exactly 2 gigabytes