Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
IIRC find will easily locate files based on timestamp with one of the tests options and the list can then be piped to cp. Have not used that for a while so the man page can help better than I can with syntax.
What is preventing use of find and either the -newer or -newermt option?
Quote:
Originally Posted by computersavvy
IIRC find will easily locate files based on timestamp with one of the tests options and the list can then be piped to cp. Have not used that for a while so the man page can help better than I can with syntax.
Sorry guys, I think aws is a remote service, so there is no direct access to that filesystem. That's why OP wanted first execute an [aws] ls, filter the result and finally [aws] cp the required files.
From the other hand I wanted to mention, the date comparison is probably not that simple, but you know if that works for you.
What is preventing use of find and either the -newer or -newermt option?
Nothing. I didnt pursue that as an option. Would it be a more simple solution?
I am now running the following and not I get this message over and over until I abort:
fatal error: An error occurred (InvalidToken) when calling the ListObjectsV2 operation: The provided token is malformed or otherwise invalid
But no files get copied to the location specified (folder)
If I run the first two parts I do get the expected results:
2021-03-23 00:35:33 104742 source/7700ABJIBA442720210811934.20210323003442.txt
2021-03-23 00:35:37 33 source/7700ABJIBA442720210811934.md5.20210323003443.txt
I am new to AWS, but it seems that the AWS tools are deficient in handling date/time stamps.
It is possible to use awk to convert the text date and time fields to a numeric time stamp. Perhaps there are some ideas here
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.