#!/usr/bin/perl use warnings; use strict; use Net::SFTP; my %args = ( user => 'login', password => 'password', debug => 0 ); my $tag = `/bin/date +"%s"`; chomp($tag); my $datum = `/usr/bin/expr $tag / 86400`; chomp($datum); my $sftp = Net::SFTP->new("IP-ADRESSE hier eintragen", %args); my $remote = "/entferntes-verzeichnis/datei.asc". $datum .".tar.gz"; my $local = "/locales-verzeichnis/datei.asc" . $datum .".tar.gz"; $sftp->get($remote, $local); print "fertig\n";