From b879ad3316b98be69082d037709c3519738b0d40 Mon Sep 17 00:00:00 2001 From: Michael King Date: Tue, 1 Oct 2019 17:19:11 -0400 Subject: [PATCH] add -atime, -ctime, and -mtime to find.md --- find.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/find.md b/find.md index fd39a5c9b..56f50fab8 100644 --- a/find.md +++ b/find.md @@ -41,6 +41,16 @@ find -size +2G # Larger than 2GiB ``` +```bash +-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 a 0) +-ctime -6h30m # File status changed within the last 6 hours and 30 minutes +-mtime +1w # Last modified more than 1 week ago +``` + ```bash -newer file.txt -newerm file.txt # modified newer than file.txt @@ -73,3 +83,7 @@ find . -name '*.jpg' -exec rm {} \; ```bash find . -newerBt "24 hours ago" ``` + +```bash +find . -type f -mtime +29 # find files modified more than 30 days ago +```