Home » Questions » Computers [ Ask a new question ]

Latest file from ftp server using wget or some other way

Latest file from ftp server using wget or some other way

"How can I download the latest file available in ftp server using wget.
If I am using the below command it is giving all the files."

Asked by: Guest | Views: 327
Total answers/comments: 1
Guest [Entry]

"My Solution is this:

curl 'ftp://server.de/dir/'$(curl 'ftp://server.de/dir/' 2>/dev/null | tail -1 | awk '{print $(NF)}')"