1、連接上相應(yīng)的linux主機(jī),進(jìn)入到等待輸入shell指令的linux命令行狀態(tài)下。
枝江ssl適用于網(wǎng)站、小程序/APP、API接口等需要進(jìn)行數(shù)據(jù)傳輸應(yīng)用場(chǎng)景,ssl證書未來市場(chǎng)廣闊!成為成都創(chuàng)新互聯(lián)的ssl證書銷售渠道,可以享受市場(chǎng)價(jià)格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:18982081108(備注:SSL證書合作)期待與您的合作!
2、在linux命令行下輸入shell指令:ps -ef | grep ftp。
3、最后,按下回車鍵執(zhí)行shell指令,此時(shí)會(huì)看到ftp進(jìn)程被成功查詢到,說明ftp功能是開啟狀態(tài)。
1、首先,連接相應(yīng)linux主機(jī),進(jìn)入到linux命令行狀態(tài)下,等待輸入shell指令。
2、在linux命令行下輸入shell指令:cat /etc/passwd|grep ftp。
3、鍵盤按“回車鍵”運(yùn)行shell指令,此時(shí)會(huì)看到所有ftp的用戶列表。
1、首先,連接相應(yīng)linux主機(jī),進(jìn)入到linux命令行狀態(tài)下,等待輸入shell指令。
2、其次,在linux命令行中輸入:ftp 10.18.34.115。
3、最后,按下回車鍵執(zhí)行shell指令,此時(shí)會(huì)看到已成功連接上ftp服務(wù),可輸入ftp命令了。
Linux之ftp命令使用方法及案例
Example 1:登陸
[root@iZ25ja2kaemZ ~]# ftp 121.199.5.52
Connected to 121.199.5.52 (121.199.5.52).
220 Microsoft FTP Service
Name (121.199.5.52:root): baitongsj
331 User name okay, need password.
Password:
230 User logged in, proceed.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp ll
?Invalid command
ftp
Example2:dir,cd?,quit 命令用法
ftp dir ./app
227 Entering Passive Mode (121,199,5,52,128,234)
150 Opening ASCII mode data connection for /bin/ls.
total 0
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:26 .
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:26 ..
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:24 Common
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:24 Conf
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:19 Lang
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:23 Lib
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:26 Runtime
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:35 Tpl
226 Transfer complete.
ftp cd base
250 Directory changed to /crms/Base
ftp dir
227 Entering Passive Mode (121,199,5,52,128,235)
150 Opening ASCII mode data connection for /bin/ls.
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:18 .
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:18 ..
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:12 Common
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:13 Conf
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:17 Extend
-rw-rw-rw-?? 1 user???? group??????? 1854 Jan 18? 2016 LICENSE.txt
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:17 Lang
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:17 Lib
-rw-rw-rw-?? 1 user???? group??????? 5600 Jan 18? 2016 README.txt
-rw-rw-rw-?? 1 user???? group??????? 1568 Jan 18? 2016 ThinkPHP.php
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:18 Tpl
-rw-rw-rw-?? 1 user???? group??????? 7396 Jan 18? 2016 logo.png
226 Transfer complete.
ftp quie
?Invalid command
ftp quit
221 Goodbye!
[root@iZ25ja2kaemZ ~]#
example3:幫助文件
ftp help
Commands may be abbreviated.? Commands are:
!?????????????? debug?????????? mdir??????????? sendport??????? site
$?????????????? dir???????????? mget??????????? put???????????? size
account???????? disconnect????? mkdir?????????? pwd???????????? status
append????????? exit??????????? mls???????????? quit??????????? struct
ascii?????????? form??????????? mode??????????? quote?????????? system
bell??????????? get???????????? modtime???????? recv??????????? sunique
binary????????? glob??????????? mput??????????? reget?????????? tenex
bye???????????? hash??????????? newer?????????? rstatus???????? tick
case??????????? help??????????? nmap??????????? rhelp?????????? trace
cd????????????? idle??????????? nlist?????????? rename????????? type
cdup??????????? image?????????? ntrans????????? reset?????????? user
chmod?????????? lcd???????????? open??????????? restart???????? umask
close?????????? ls????????????? prompt????????? rmdir?????????? verbose
cr????????????? macdef????????? passive???????? runique???????? ?
delete????????? mdelete???????? proxy?????????? send
ftp help dir
dir???????????? list contents of remote directory
ftp help mdir
mdir??????????? list contents of multiple remote directories
ftp
example4:重命名文件
ftp dir
227 Entering Passive Mode (121,199,5,52,128,234)
150 Opening ASCII mode data connection for /bin/ls.
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:46 .
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:46 ..
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:39 Install
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:36 appImg
drw-rw-rw-?? 1 user???? group?????????? 0 Nov 11 11:08 css
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:37 excelmodel
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:46 file
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:37 ico
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:38 img
drw-rw-rw-?? 1 user???? group?????????? 0 Nov 11 11:11 js
-rw-rw-rw-?? 1 user???? group?????????? 3 Oct 25 15:56 ni.txt
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:46 sound
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:46 sql
226 Transfer complete.
ftp rename ni.txt ss
350 File or directory exists, ready for destination name
250 RNTO command successful.
ftp dir
227 Entering Passive Mode (121,199,5,52,128,235)
150 Opening ASCII mode data connection for /bin/ls.
drw-rw-rw-?? 1 user???? group?????????? 0 Nov 16 16:57 .
drw-rw-rw-?? 1 user???? group?????????? 0 Nov 16 16:57 ..
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:39 Install
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:36 appImg
drw-rw-rw-?? 1 user???? group?????????? 0 Nov 11 11:08 css
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:37 excelmodel
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:46 file
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:37 ico
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:38 img
drw-rw-rw-?? 1 user???? group?????????? 0 Nov 11 11:11 js
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:46 sound
drw-rw-rw-?? 1 user???? group?????????? 0 Nov? 9 18:46 sql
-rw-rw-rw-?? 1 user???? group?????????? 3 Oct 25 15:56 ss
226 Transfer complete.
example5 :格式 get [remote-file] [local-file],將文件從遠(yuǎn)端主機(jī)中傳送至本地主機(jī)中,如要獲取服務(wù)器上\rose\1.bmp,則? ftp get /rose/1.bmp??? /tmp/1.bmp (回車),必須給出第二個(gè)參數(shù),否則會(huì)復(fù)制失敗,登錄后執(zhí)行:
ftp get robots.txt /tmp/
local: /tmp/ remote: robots.txt
227 Entering Passive Mode (121,199,5,52,128,233)
150 Opening BINARY mode data connection for robots.txt (26 Bytes).
local: /tmp/: Is a directory
226 Transfer complete.
226 ABOR command successful.
ftp
example 6:lcd 命令
ftp lcd ..
Local directory now /
ftp lcd /tmp/flower
Local directory now /tmp/flower
example 7: put命令
格式:put local-file [remote-file]
將本地一個(gè)文件傳送至遠(yuǎn)端主機(jī)中.
如要把本地的1.bmp傳送到遠(yuǎn)端主機(jī)e:\rose,并改名為333.bmp
ftp put 1.bmp /rose/333.bmp (回車)
ftp put /tmp/tt.txt ./nihaol.txt
local: /tmp/tt.txt remote: ./nihaol.txt
227 Entering Passive Mode (121,199,5,52,128,232)
150 Opening BINARY mode data connection for nihaol.txt.
226 Transfer complete.
5 bytes sent in 2.6e-05 secs (192.31 Kbytes/sec)
example 8: mput命令
格式:mput local-files
將本地主機(jī)中一批文件傳送至遠(yuǎn)端主機(jī).
如要把本地當(dāng)前目錄下所有bmp文件上傳到服務(wù)器e:\rose 下
ftp cd /rose (回車)
ftp mput *.bmp (回車)
注意:上傳文件都來自于主機(jī)的當(dāng)前目錄下。比如,在 /root/test下運(yùn)行的ftp命令,則只有在/root/test下的文件linux才會(huì) 上傳到服務(wù)器e:\rose 下
文章名稱:linux命令行下ftp的簡(jiǎn)單介紹
標(biāo)題URL:http://vcdvsql.cn/article48/doieshp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站設(shè)計(jì)、服務(wù)器托管、用戶體驗(yàn)、ChatGPT、微信小程序、外貿(mào)網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)