Log file to confirm SFTP Upload
<p>I am accessing a SFTP via LFTP using the script below.  It runs from cron at 4/11/16/23.  For some unknown reason at unknown intervals I am getting failures.  How can print a log file that will confirm ls -l for the file I am uploading? I am hoping it can be wrapped into the existing script.  Is there a better way to log a confirm than ls -l?</p>

<pre><code># Upload to SFTP via LFTP
#
host="hostname.com"
user="usrname"
pass="passw"
rdir="remote/dir"
file="upload-file.txt"

lftp -u $user,$pass sftp://$host -e "cd $rdir ; put $file ; bye"
# 
</code></pre>