Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I load all the files created in last 24 hours from a server X to server Y through a script (both being linux servers)?

I do know that the command find . -mtime -1 -exec cp '{}' <new_dir> would copy all the files in current directory to . But I am not sure how to do this for a located on another server.

share|improve this question
Run find on the other server instead of in . on the local machine? – geekosaur Apr 25 '12 at 19:43
-mtime finds modified files, not created files. There's a difference. What you're looking for sounds like rsync. – Daniel Beck Apr 25 '12 at 19:43
up vote 3 down vote accepted

Take a look at rsync. It could be a good match for your needs.

share|improve this answer

Just replace cp with scp and set up an ssh key pair without a passphrase.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .