I'd like to run an scp transfer to download the latest (newest) file in a certain directory to my local directory.
Something like this:
- source:
root@rimmer.sk:/home/rimmer/backups/
- destination:
/home/rimmer/backups/
While getting the newest file only, not all of them, in backups
.
scp -r
. – slm Jul 10 '13 at 08:06scp
get's interrupted it will have to restart the copying from the beginning,rsync
can resume from where it left off. – slm Jul 10 '13 at 08:24ssh
. – Johannes Bittner Mar 14 '19 at 17:21/*
to the end of the second $dir):scp $server:$(ssh $server 'ls -t $dir/* | head -1') .
– Jesse Apr 23 '19 at 03:20