Find Date and Time

Examples

Find last 50 days modified files

$ find / -mtime 50

find last 50 days accessed files

$ find / -atime 50

find last 50-100 days modified files

$ find / -mtime +50 –mtime -100

find changed files in last 1 hour

$ find / -cmin -60

find modified files in last 1 hour

$ find / -mmin -60

find accessed files in last 1 hour

$ find / -amin -60

Means

Option Description
atime access time (last time file opened)
mtime modified time (last time file contents was modified)
ctime changed time (last time file inode was changed)

#Example

Option Description
-mtime +0 Modified greater than 24 hours ago
-mtime 0 Modified between now and 1 day ago
-mtime -1 Modified less than 1 day ago (same as -mtime 0)
-mtime 1 Modified between 24 and 48 hours ago
-mtime +1 Modified more than 48 hours ago
-mtime +1w Last modified more than 1 week ago
-atime 0 Last accessed between now and 24 hours ago
-atime +0 Accessed more than 24 hours ago
-atime 1 Accessed between 24 and 48 hours ago
-atime +1 Accessed more than 48 hours ago
-atime -1 Accessed less than 24 hours ago (same as -atime 0)
-ctime -6h30m File status changed within the last 6 hours and 30 minutes
Comments