Latest file from ftp server using wget or some other way

ftpwget

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.

wget ftp://id:password@ftpserver/dir/*

Regards,
Ram.

Best Answer

Just add the "-N" option to wget to ignore files older than what you have locally. You could also add the "-nc" to completely skip a file if it already exists, even if the one on FTP is newer.

wget -N ftp://id:password@ftpserver/dir/*

Related Question