How can I capture output from LFTP? (Output not written to STDOUT or STDERR?)
Solution 1:
It sounds to me like it's buffering its output. You might try the unbuffer expect script (man page).
Solution 2:
See for the "log:file/xfer" default setting by entering set
command in lftp.
Possible output:
set log:file/xfer /home/USERNAME/.local/share/lftp/transfer_log
You can change this in different ways off course.
lftp -c 'open -e "set log:file/xfer /home/USERNAME/myown.log; mget *.csv; bye" -u uname,psswd 172.16.100.101' >> $log
Solution 3:
Check the xfer domain variables :
set xfer:log 1
set xfer:eta-period 5 # every 5 seconds
set xfer:rate-period 20 # average rate
will put log transfer information into ~/.lftp/transfer_log
Not sure you can change the log file destination nevertheless