Story
My company needs grab files from 3rd party servers daily and only today’s file. Here are useful snippets of FTP and SFTP.
Wget From FTP
If you need wget
download specific file from another server, there is accept list argument -A
that helps us filter today’s file.
|
|
SFTP
For SFTP, once you have public key installed on their server, you can do the following12345today=$(date +"%Y-%m-%d")sftp name@server.com <<EOFget *$today* destination.csv // name the file as destination.csvquitEOF