I'm trying to use lftp to download all files from a remote ftp server to the local server in our multi-site enterprise that are older than a certain age and remove them from the remote server.
The command I'm trying is:
lftp -c "set ftp:list-options -a; set ftp:passive-mode false; open ftp://user:pass@host:port; cd '/path/'; mirror --older-than 30s --Remove-source-files --verbose"
The problem is I get the error: 30s: No such file or directory
Likewise with "--older-than now-5min"
Am I reading the man page wrong?
For the curious, here's why: I only want to grab the completed files from the remote server... I want "--older-than 30s" so it skips files that are still being written to.