17

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.

21

That means all the jar files in the directory had status changes less than 48 hours ago.

Detailed explanation

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.