I'm building an production site update script using expect and lftp.
I'm trying for sometime to do this simple thing: send a file overwriting if it exists. But I just can't find a command that allow me to overwrite destination on put. put -c just continues if it's the same file. But if it's different it does nothing.
Do I really have to check if the file exists and delete it in order to put the file in the server ? isn't there a direct command ?
If that's the only option, then there's another thing I couldn't find: a command to see if the file exists. My only option is to treat ls's output ?
I also accept recommendations if there's another ftp client that allows me to do these things in an easier manner.