Python day8 FTP Job
The directory is as follows: (Python3 program)
The GitHub address is as follows: Https://github.com/liang2580/FTP2
[Email protected] ~]# tree ftp2/
ftp2/├──ftpclient│├──123│├──ftp_client.py # # #客户端程序 startup program │├──__init__. py│├──liang│└──te├──ftpserver│├──bin││├──ftp_server.py # # # server-side entry program, ││└──__init__. py│├──conf││├──accounts.cfg #这个是用户配置文件 ││├──da.py││├──__init__. py││├──__pycache__│││├──__init__. cpython-36. pyc│││├──__init__. cpython-37. Pyc│││├──settings.cpython-36. Pyc│││└──settings.cpython-37. pyc││└──settings.py # # #这个是系统配置文件 │├──core││├──ftp_server.py # main logic code ││├──main.py # Core Entry ││└──__pycache__││├──ftp_server.cpython-36. Pyc││├──ftp_server.cpython-37. Pyc││├──main.cpython-36. Pyc││└──main.cpython-37. pyc│└──home│├──__init__. Py│└──liang # User plus directory │├──12│├──123│├──2│├──4│├──456│├──55│├──66││└──aa│├──liang│├──liang2580│└──token├──__init__. Py└──readme.md
README.MD Introduction
A little Gadget #这是一个python ftp
Run the words.
The Server-side way is that the default port is 9999
[[Email protected]_client ftp]# python3 ftpserver/bin/ftp_server.py start
Start is the way to start
Client connection.
[[Email protected]_client ftp]# python3 ftpclient/ftp_client.py-s 127.0.0.1-P9999-ULIANG-PABC123
Default account Password Liang abc123 parameter explanation-S represents the server IP address-p Port-u user name-p password
With upload and download No, go in. help [Liang]$:help [' Help ']
get filename #get file from FTP server put filename #upload file to FTP server ls #list files in current dir on FTP server pwd #check current path on server cd path #change directory , same usage as linux cd command touch # touch file rm # rm file rm director mkdir
[liang]$:
Support user authentication, file upload, file download, file establishment, folder establishment, delete, these functions. No log logs were written. Wait for the next update, add some compression, log and other functions
Python day8 FTP Job