A
A
Alick72016-12-19 09:43:03
FTP
Alick7, 2016-12-19 09:43:03

How to correctly compose an lftp script so that the latest file is downloaded by modification date?

In general, I started writing the script
#!/bin/sh
lftp -u login,pass 10.10.10.10 << EOF
cd /incoming/files
ls -tr | tail -1
EOF
Shows the most recent file by modification date. If you add a mirror, then it downloads the entire directory.
Tell me how to finish it!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alistair O, 2016-12-19
@box4

can put in a variable and there already transfer to download?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question