Answer the question
In order to leave comments, you need to log in
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question