current position:Home>Application of Python simplehttpserver

Application of Python simplehttpserver

2022-06-24 05:47:56Koshino

Python Next SimpleHTTPServer Application

To improve work efficiency < Learning gadgets , Learn to apply >

One , Application scenarios

File transfer between services -A Server files copy To B The server

Two , Application content

Linux When transferring files , except ssh and scp、ftp Common methods ,Python Next SimpleHTTPServer Gadgets can also be transferred quickly .

stay Linux On the server or installed Python On the machine , Use Python Bring one with you WEB The server SimpleHTTPServer.

3、 ... and , Applied grammar

python -m SimpleHTTPServer

Quickly build a http service , Provides a file view of web service . It's used in LAN web To visit http:/IP:8000 that will do

Four , Apply command

1,A Service knock command : python -m SimpleHTTPServer 9999

Use the above command to publish the current directory to 9999 port .

Be careful : This command is currently running , Not running in the background , That is to say if Ctrl + C, Then the port will be closed

2,B Server operations


wget A Server's ip: port

copyright notice
author[Koshino ],Please bring the original link to reprint, thank you.

Random recommended