12 find <path> <conditions> <actions>
33 -depth 2 # At least 3 levels deep
38 -size 8 # Exactly 8 512-bit blocks
39 -size -128c # Smaller than 128 bytes
40 -size 1440k # Exactly 1440KiB
41 -size +10M # Larger than 10MiB
42 -size +2G # Larger than 2GiB
47 -newerm file.txt # modified newer than file.txt
48 -newerX file.txt # [c]hange, [m]odified, [B]create
49 -newerXt "1 hour ago" # [t]imestamp
52 ### Access time conditions
55 -atime 0 # Last accessed between now and 24 hours ago
56 -atime +0 # Accessed more than 24 hours ago
57 -atime 1 # Accessed between 24 and 48 hours ago
58 -atime +1 # Accessed more than 48 hours ago
59 -atime -1 # Accessed less than 24 hours ago (same a 0)
60 -ctime -6h30m # File status changed within the last 6 hours and 30 minutes
61 -mtime +1w # Last modified more than 1 week ago
64 These conditions only work in MacOS and BSD-like systems (no GNU/Linux support).
69 \! -name "*.c" # NOT named "*.c"
85 find . -name '*.jpg' -exec rm {} \;
89 find . -newerBt "24 hours ago"
93 find . -type f -mtime +29 # find files modified more than 30 days ago
94 find . -type f -newermt 2016-08-07 \! -newermt 2016-08-08 # find in date range