Python day8 FTP Job

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.