AWS cli sync filenames with date newer than two years

Viewed 41

I have multiple files in my S3 bucket and I need a crontab to sync only files which newer than 2 years. I have a lot of files with '+%y%m%d' format and postfix with number

20170717-0
20210110-1

I don't have any idea how to sync with this condition $(date --date='<=2 year ago' '+%Y%m%d').

Also I know about --include and --exclude. And don't want to use workaround with delete files with find and mtime.

0 Answers
Related