lftp怎么上传目录 shell_shell脚本之lftp上传

沈嘉瑞
2023-12-01

#!/bin/bash

# Upload HW cdr to ESB by FTP

# wirter by HanBing TEL:

local=/opt/NMSAPP/business/hwbill/tarFile/

yesterday=`date -d "1 day ago" +"%Y%m%d"`

cd $local

find $local -type f -cmin +15 -exec mv {} ../backup/ \;

cd /opt/NMSAPP/business/hwbill/backup/

lftp xx.xx.xx.xx -p x -u uname,'passwd' -e 'cd /opt/esb/Downloads/esbdata/ESBcdr/;mput *.tar.gz;bye'

rm -f LN*.tar.gz

#!/bin/sh

ftp -n IP PORT<

user USERNAME PASSWORD

cd DIR

bin

prompt

mput FILENAMES

bye

EOF

 类似资料: