本文介紹了python中的單線ftp服務(wù)器的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!
問(wèn)題描述
是否可以在 python 中使用一行命令來(lái)做一個(gè)簡(jiǎn)單的 ftp 服務(wù)器?我希望能夠以快速和臨時(shí)的方式將文件傳輸?shù)?linux 機(jī)器,而無(wú)需安裝 ftp 服務(wù)器.最好是使用內(nèi)置 python 庫(kù)的方法,因此無(wú)需安裝任何額外內(nèi)容.
Is it possible to have a one line command in python to do a simple ftp server? I'd like to be able to do this as quick and temporary way to transfer files to a linux box without having to install a ftp server. Preferably a way using built in python libraries so there's nothing extra to install.
推薦答案
強(qiáng)制 Twisted 示例:
twistd -n ftp
而且可能有用:
twistd ftp --help
Usage: twistd [options] ftp [options].
WARNING: This FTP server is probably INSECURE do not use it.
Options:
-p, --port= set the port number [default: 2121]
-r, --root= define the root of the ftp-site. [default:
/usr/local/ftp]
--userAnonymous= Name of the anonymous user. [default: anonymous]
--password-file= username:password-style credentials database
--version
--help Display this help and exit.
這篇關(guān)于python中的單線ftp服務(wù)器的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!