http://moto.debian.org.tw/viewtopic.php?t=2182
--------------------------------------------------------------------------------------
指令名稱:lftp

簡要功能說明:多才多藝的檔案傳輸工具

詳細說明:lftp 支援了六種模式, ftp, ftps, http, https, hftp, fish and file(當然了 https 和 ftps 的支援必須在編譯就和 openssl library 一起編譯好)。

lftp 內建了 shell-like 的命令格式, 允許在背景同時執行多個命令(&)。所有背景執行的工作都是在同一個程序中(process), 能將前景執行的命令放到背景執行(Ctrl-z), 或從背景拿回前景執行(wait 或 fg), 甚至還可以經由上個命令的傳回值來決定目前這個命令是否要執行(&& ||)。

在結束 lftp 時, 如果還有程序執行中, lftp 會將自己切換到 no hup 模式並放到背景執行。因此不必擔心執行 lftp 當中無法登出。

參數:
lftp :~> help
!<shell-command>
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 [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>

可用 help command 來看更詳細的說明
如 help alias

範例:

!<shell-command>
可執行本地端 shell 中的命令, 如 !ls /usr/local/bin/
由於 lftp 並沒有 lls(顯示本地端檔案列表的指令), 故可用 !ls 來替代。

alias [<name> [<value>]]
定義別名
alias less more
alias reconnect "close; cd ."
直接輸入 alias 即可看到目前定義了那些別名。如果只輸入 alias name 的話, 則是取消 name 這個別名。


bookmark [SUBCMD]
設定書籤, 可將目前站台及所在目錄設成書籤, 下次可直接進來, 不用再 cd 來 cd 去的

bookmark add name 用來新增名稱為 name 的書籤
bookmark del name 刪除名稱為 name 的書籤
bookmark list 顯示目前有設定那些書籤(另外直接打 bookmark 和 bookmark list 的結果一樣)
bookmark edit 呼叫編輯器修改書籤 (~/.lftp/bookmarks)


cat [OPTS] files...
就是 cat 啦


more <files>
功用和 cat <files> | more 一樣


zcat <files>
可直接看 .gz 的文件


zmore <files>
和 more 一樣, 但是可看 .gz 的文件


chmod [OPTS] mode file...
更改檔案權限
chmod --recursive
遞迴的更改權限


cd <rdir> 切換遠端目錄


cache [SUBCMD]
管理 lftp 的 cache


[r
arrow
arrow
    全站熱搜

    Aminzai 發表在 痞客邦 留言(0) 人氣()