ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
All, i need to rsync a file by the newest date stamp over ssh. The format of the file looks like:
-rw-rw-r-- 1 user user 87 Sept 15 19:59 test.log.2008-09-15
Ive hear you can use find and mtime and then pipe it to rsync. If anyone has an idea how to do this and can give me an example command to use it would be very much appreciated.
Well, rsync automatically updates/copies any file that has changed/is newer than the corresponding target area, so it should take care or that automatically for you.
One of the main points of rsync is that it only sends differences (by default), so if you have a dir full of logfiles it'll only send the new one(s). You don't have to specify that restriction yourself...
well i have the newest part of this issue resolved, now i need help with an error. When i run the below command on the command line it works great:
rsync -av /localdirectory/file.log* userid@remotehost:/remote directory
But when i dump it in expect, because it required a password. This is the only way i can do this, i cant generate keys, etc...
building file list ... rsync: link_stat "localdirectory/server*" failed: No such file or directory (2)
done
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.