Linux文件操作命令之LFTP、FTP

我的操作脚本范例:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
HOST="v0.ftp.upyun.com"
USER="your_name/your_project_name"
PASS="your_password"
LCD="/home/work/bak"
RCD="/bx-hk"
lftp -c "open ftp://v0.ftp.upyun.com
user $USER $PASS;
lcd $LCD;
cd $RCD;
mirror --reverse --only-newer --dereference --verbose \
--exclude-glob=*.php \
--exclude-glob=*.xml \
--exclude-glob=*.htm \
--exclude-glob=*.html \
--exclude-glob=*.psd \
--exclude-glob=*.mo \
--exclude-glob=*.po \
--exclude-glob=*.pot \
--exclude-glob=arthemia/ \
--exclude-glob=ad/ \
--exclude-glob=report/ \
--verbose
;
"