You might want to take a look at the unix command rsync. If you don't have it on your system already and you are on Debian, run the command apt-get install rsync to download and install it. It has a ton of options, and can copy files both local to local and local to remote. It can be used either for synchronizing directories or for plain old copies.
I'm assuming you are on *nix, but for readers who have a similar problem and are on MSWin, rsync is also part of the bundle of tools available with cygwin. I think cygwin users need to run setup.exe and select it - I don't think its in the base set of tools that is installed automatically. I think there are also pure MSWin versions as well - search the internet if you happen to be on MsWin.
If rsync interests you, you might want to take a look at some of the Perl oriented rsync modules:
- File::Rsync - Perl wrapper around the system command.
- Rsync::Config - module for generating rsync configuration file. You don't need to use configuration files with rsync but it can help if you have a lot of non-standard option settings or are setting up a synchronization action that will run repeatedly.
- File::RsyncP - a pure perl implementation of the client side of a local-to-remote/remote-to-local rsync.
Best, beth
Update: fixed link to man page.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.