Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

1 Answer 1

I am not sure how strict is the requirement "only the files that were created today". If you're ok with "only the files that have changed (or 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

 
discard

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.