Pretty wierd error message came up on Centos.
I tried to run this command:
find /tmp/something -type f -mtime +2h -exec cp '{}' /tmp/target \;
And the error I've got:
find: invalid argument `-exec' to `-mtime'
Can the 'find' be different on other distributions?
Best Answer
-mtime
is used for days, if you need 2 hours check this:mmin specifies minutes so -mmin +120 will filter those more than 120 minutes ago (2 hours). From the manual: