I have this folder full of files.
Once per day, I want the newest of the files to be FTPed automatically to a file server.
|
|
|
Make a short script, get the filename via this line:
(assuming If you have
Without ncftp, this may work:
|
|||||||||
|
Locating the newest fileThe easiest way to find the newest file in a directory is to use zsh and its glob qualifiers
There's no good, portable method. The only portable method is to use
FTP uploadFor the upload, there are many tools. A commonly installed one is curl.
Another approach is to mount the remote directory as a filesystem, for example with curlftpfs.
Automating the taskAdd a crontab entry to perform the task every day. Run
|
|||
|
|