If I run the following command:
find . -name "*.jar" -type f -ctime +1
I get no results back, whereas if i run:
find . -name "*.jar" -type f -ctime 1
I get results.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityIf I run the following command:
find . -name "*.jar" -type f -ctime +1
I get no results back, whereas if i run:
find . -name "*.jar" -type f -ctime 1
I get results.
That means all the jar files in the directory had status changes less than 48 hours ago.
According to the find
man page,
-ctime n
File's status was last changed n*24 hours ago.
And ...
When find figures out how many 24-hour periods ago the file was
last accessed, any fractional part is ignored, so to match -atime +1,
a file has to have been accessed at least two days ago.
And elsewhere ...
+n for greater than n
Therefore -ctime +1
means the file status must have changed at least 48 hours ago.