On 8 Dec 2003 18:05:19 -0800
(JennAshton) wrote:
> I wrote a simple scp script from my server to pacman server which
> copies all jpg files to /jennash/ directory.
>
> Now, I need help with this script. I would like it to pull not just
> *.jpg files but other file types as well. Also, is it possible to
> pull only files that is 3 minutes old? Please help.
>
> Thanks!
>
> JennAsh
>
> #!/usr/bin/perl
>
> system('scp /export/www/docs/*.jpg pacman:/export/www/jennash/');
>
> exit;
You could check out the Net::SCP and File::Find modules. What you
have written could have been done in *any* *NIX shell - for as little
Perl you have in it.
--
Jim
Copyright notice: all code written by the author in this post is
released under the GPL.
http://www.gnu.org/licenses/gpl.txt
for more information.
a fortune quote ...
You should never wear your best trousers when you go out to fight
for freedom and liberty. -- Henrik Ibsen