I'm new to using Ubuntu server.
How can I copy all files except today's date from a directory to s3 bucket? Again, I only want to copy files which are dated "up to yesterday".
I'm new to using Ubuntu server.
How can I copy all files except today's date from a directory to s3 bucket? Again, I only want to copy files which are dated "up to yesterday".
You can use the find command with exec.
This can help you find files modified before a specific date:
find . ! -newermt 2018-11-01
The resulta is a list. If you wanna copy, then you can use this:
find . ! -newermt 2018-11-01 -type f -exec cp '{}' /path/to/send/ \;
More info about find command here