LFTP 소프트웨어 상세 설명

lftp 는 다운 로드 를 지원 하고 업로드 하 는 동시에 screen 용법 을 지원 하 는 도구 입 니 다. ftp 에 해당 하 는 클 라 이언 트 입 니 다. 파일 에 접근 하 는 프로 토 콜 은 ftp, ftps, http, https, hftp, fish 입 니 다.
1. 로그 인 방법:
lftp 사용자 이름: 비밀번호 @ ip 주소
[root@zhu2 ~]# lftp zhu:[email protected]
lftp [email protected]:~> ls -l
drwxr-xr-x    9 500      500          4096 Sep 09 16:02 LVS
-rw-r--r--    1 500      500             0 Sep 09 15:52 txt1

lftp  사용자 이름 @ ip 주소
lftp 192.168.70.137:~> bye
[root@zhu2 ~]# lftp [email protected]
  :
lftp [email protected]:~> ls -l
drwxr-xr-x    9 500      500          4096 Sep 09 16:02 LVS
-rw-r--r--    1 500      500             0 Sep 09 15:52 txt1

lftp  ip 주소 - p 엔 드 구호 - u 사용자, 비밀번호
[root@zhu2 ~]# lftp 192.168.70.137 -u zhu,123456
lftp [email protected]:~>

lftp ip 주소: 포트 - u 사용자, 비밀번호
[root@zhu2 ~]# lftp 192.168.70.137:21 -u zhu,123456
lftp [email protected]:~>

2. 상용 명령
도움말: 파일 목록 보기
lftp [email protected]:~> help
!<shell-command>                    (commands)
alias [<name> [<value>]]            anon
bookmark [SUBCMD]                   cache [SUBCMD]
cat [-b] <files>                    cd <rdir>
chmod [OPTS] mode file...           close [-a]
[re]cls [opts] [path/][pattern]     debug [<level>|off] [-o <file>]
du [options] <dirs>                 exit [<code>|bg]
get [OPTS] <rfile> [-o <lfile>]     glob [OPTS] <cmd> <args>
help [<cmd>]                        history -w file|-r file|-c|-l [cnt]
jobs [-v]                           kill all|<job_no>
lcd <ldir>                          lftp [OPTS] <site>
ls [<args>]                         mget [OPTS] <files>
mirror [OPTS] [remote [local]]      mkdir [-p] <dirs>
module name [args]                  more <files>
mput [OPTS] <files>                 mrm <files>
mv <file1> <file2>                  [re]nlist [<args>]
open [OPTS] <site>                  pget [OPTS] <rfile> [-o <lfile>]
put [OPTS] <lfile> [-o <rfile>]     pwd [-p]
queue [OPTS] [<cmd>]                quote <cmd>
repeat [OPTS] [delay] [command]     rm [-r] [-f] <files>
rmdir [-f] <dirs>                   scache [<session_no>]
set [OPT] [<var> [<val>]]           site <site_cmd>
source <file>                       user <user|URL> [<pass>]
version                             wait [<jobno>]
zcat <files>                        zmore <files>
lftp [email protected]:~>

ls: 원 격 호스트 의 파일 이나 디 렉 터 리 보기
!ls: 로 컬 디 렉 터 리 에 있 는 파일 목록 보기
lftp [email protected]:~> ls
drwxr-xr-x    9 500      500          4096 Sep 09 16:02 LVS
-rw-r--r--    1 500      500             0 Sep 09 15:52 txt1
lftp [email protected]:~> !ls
iptables  lnmp  LVS

pwd: 원 격 호스트 의 디 렉 터 리 표시
lpwd: 로 컬 디 렉 터 리 를 표시 합 니 다.
lftp [email protected]:~> pwd
ftp://zhu:[email protected]:21/%2Fhome/zhu
lftp [email protected]:~> lpwd
/root

cd: 원 격 호스트 디 렉 터 리 전환
lcd: 로 컬 디 렉 터 리 전환
lftp [email protected]:~> pwd
ftp://zhu:[email protected]:21/%2Fhome/zhu
lftp [email protected]:~> lpwd
/root
lftp [email protected]:~> cd lvs
lftp [email protected]:~/lvs> pwd
ftp://zhu:[email protected]:21/%2Fhome/zhu/lvs
lftp [email protected]:~/lvs> lcd /root/iptables/
lcd   ,     =/root/iptables
lftp [email protected]:~/lvs> lpwd
/root/iptables

get 파일 이름: 로 컬 에 있 는 현재 디 렉 터 리 에 단일 파일 다운로드
lftp [email protected]:~> get txt1
lftp [email protected]:~> !ls
iptables  lnmp  LVS  txt1

mget (어댑터 지원, 여러 파일 동시 다운로드 가능)
lftp [email protected]:~/lvs> mget auto*
3429843 bytes transferred
Total 2 files transferred
lftp [email protected]:~/lvs> !ls
autoconf-2.68.tar.gz  automake-1.11.2.tar.gz  iptables  lnmp  LVS  txt1

put 파일 이름: 원 격 호스트 의 현재 디 렉 터 리 에 로 컬 파일 을 업로드 합 니 다.
lftp [email protected]:~> put zabbix_sender.py
2764 bytes transferred
lftp [email protected]:~> ls -l
drwxr-xr-x    9 500      500          4096 Sep 09 16:02 lvs
-rw-r--r--    1 500      500             0 Sep 09 15:52 txt1
-rw-r--r--    1 500      500          2764 Sep 09 17:35 zabbix_sender.py
-rw-r--r--    1 0        0               0 Sep 09 17:32 zhujiangtao
drwxr-xr-x    2 0        0            4096 Sep 09 17:32 zhuzhu

mput: 여러 파일 지원 어댑터 를 동시에 업로드 합 니 다.
lftp [email protected]:~> mput check*
14908 bytes transferred
Total 2 files transferred
lftp [email protected]:~> ls -l
-rw-r--r--    1 500      500           585 Sep 09 17:35 checkSYSConfig.ini
-rw-r--r--    1 500      500         14323 Sep 09 17:35 checklastLoginAndipTables.py
drwxr-xr-x    9 500      500          4096 Sep 09 16:02 lvs
-rw-r--r--    1 500      500          2764 Sep 09 17:35 zabbix_sender.py
-rw-r--r--    1 0        0               0 Sep 09 17:32 zhujiangtao
drwxr-xr-x    2 0        0            4096 Sep 09 17:32 zhuzhu

get, put 명령 은 파일 을 대상 으로 합 니 다.
디 렉 터 리 를 겨냥 하려 면 다른 중요 한 명령 을 사용 할 수 있 습 니 다.mirror
3. mirror 명령 의 용법
mirror  디 렉 터 리 이름 :전체 디 렉 터 리 다운로드 (이 디 렉 터 리 에 포 함 된 하위 디 렉 터 리 포함)
lftp [email protected]:~> mirror lvs/
Total: 130 directories, 3401 files, 7 symlinks
New: 3401 files, 7 symlinks
69273581 bytes transferred in 25 seconds (2.65M/s)
lftp [email protected]:~> !ls lvs
7e3a82377fa8.tar.bz2    ClusterLabs-resource-agents-b735277  libnet-1.1.6
autoconf-2.68       glue-1.0.9.tar.bz2           libnet-1.1.6.tar.gz
autoconf-2.68.tar.gz    Heartbeat-3-0-7e3a82377fa8       Reusable-Cluster-Components-glue--glue-1.0.9
automake-1.11.2     ipvsadm-1.24                 v3.9.2
automake-1.11.2.tar.gz  ipvsadm-1.24.tar.gz

mirror  원 격 디 렉 터 리 로 컬 디 렉 터 리 :원 격 디 렉 터 리 를 로 컬 에 다운로드 하고 이름 을 바 꿉 니 다.
lftp [email protected]:~> mirror zhuzhu/  taotao
Total: 1 directory, 1 file, 0 symlinks
New: 1 file, 0 symlinks
lftp [email protected]:~> bye
[root@zhu2 ~]#
[root@zhu2 ~]# ll
   16
drwxr-xr-x  2 root root 4096 09-06 20:32 iptables
drwxr-xr-x 14 root root 4096 09-02 23:14 lnmp
drwxr-xr-x  9 root root 4096 09-03 23:34 LVS
drwxr-xr-x  2 root root 4096 09-09 05:38 taotao

mirror  .   :원 격 호스트 의 현재 디 렉 터 리 에 있 는 모든 파일 과 디 렉 터 리 를 다운로드 합 니 다.
[root@zhu2 ~]# lftp 192.168.70.137 -u zhu,123456
lftp [email protected]:~> ls
-rw-r--r--    1 500      500           585 Sep 09 17:35 checkSYSConfig.ini
-rw-r--r--    1 500      500         14323 Sep 09 17:35 checklastLoginAndipTables.py
-rw-r--r--    1 500      500          2764 Sep 09 17:35 zabbix_sender.py
-rw-r--r--    1 500      500             0 Sep 09 17:32 zhujiangtao
drwxr-xr-x    2 500      500          4096 Sep 09 21:30 zhuzhu
lftp [email protected]:~> mirror .
Total: 2 directories, 5 files, 0 symlinks
New: 5 files, 0 symlinks
17672 bytes transferred
To be removed: 18 directories, 15 files, 0 symlinks
lftp [email protected]:~> !ls
checklastLoginAndipTables.py  iptables  LVS       zhujiangtao
checkSYSConfig.ini        lnmp  zabbix_sender.py  zhuzhu

mirror  -R  로 컬 디 렉 터 리: 전체 디 렉 터 리 업로드
[root@zhu2 ~]# lftp 192.168.70.137 -u zhu,123456
lftp [email protected]:~> mirror -R iptables/
Total: 1 directory, 4 files, 0 symlinks
New: 4 files, 0 symlinks
77399 bytes transferred
lftp [email protected]:~> ls
-rw-r--r--    1 500      500           585 Sep 09 17:35 checkSYSConfig.ini
-rw-r--r--    1 500      500         14323 Sep 09 17:35 checklastLoginAndipTables.py
drwxr-xr-x    2 500      500          4096 Sep 09 21:33 iptables
-rw-r--r--    1 500      500          2764 Sep 09 17:35 zabbix_sender.py
-rw-r--r--    1 500      500             0 Sep 09 17:32 zhujiangtao
drwxr-xr-x    2 500      500          4096 Sep 09 21:30 zhuzhu

좋은 웹페이지 즐겨찾기