I was trying to find all files dated and all files 3 days or more ago.
find /home/test -name 'test.log.\d{4}-d{2}-d{2}.zip' -mtime 3
It is not listing anything. What is wrong with it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
-nameuses globular expressions,aka wildcards. What you want is
-regexneed to tell
findto use ExtendedRegular Expressions via the
-regextype posix-extendedflagbecause in regex a period has the
special meaning of any single
character. What you want is a
literal period denoted by
\.greater than 3 days old, you need to prefix your number with a
+asin
-mtime +3.Proof of Concept