Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

I am trying to find out how I can transfer files from one directory/server to another directory/server?

What I need to consider is that I should transfer files that are created TODAY only. i.e. the folder will look like this:

04/20/2012 <n files>
04/14/2012 <m files>

and if I am running the job today, the script should transfer only the n files that were created today.

Can anyone please help me out how I should do this?

share|improve this question

I'm not sure how strict is your requirement: only the files that were created today.

If you're ok with only the files that have changed (or are new), then a possible solution is:

ssh user1@server1 rsync -urv path/to/dir/ user2@server2:/path/to/dir/
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.