Summary: use python to quickly open http service

1. Background

We may often need to download some files from a certain machine. In addition to scp, sz and other related commands, we may wish to download these files directly through wget, such as downloading jar packages or war packages on the machine. This article sorts out some methods .

2. Use python to quickly open http service

The SimpleHTTPServer module that comes with python can quickly build an httpserver.

Operation method: log in to the server, enter the corresponding directory, and execute the python command

Instruction: python -m SimpleHTTPServer 10000

As shown in the figure below, enter /data/weiwei/, and open the http service with port 10000 through the command python -m SimpleHTTPServer 10000

 Let's visit http://10.41.26.131:10000/ : you can see all the files, so far, you can download these files directly

 

Guess you like

Origin blog.csdn.net/w2009211777/article/details/130146653