Quickly share files with python SimpleHTTPServer
With python2 builtin SimpleHTTPServer
(or http.server
in python3), you can start an http service to easily and quickly share a directory with files, which is especially useful and convenient in LAN environments.
With default port 8000
$ cd $directory
$ python -m SimpleHTTPServer # python2
$ python -m http.server # python3
Serving HTTP on 0.0.0.0 port 8000 ...
With custom port xxxx
$ cd $directory
$ python -m SimpleHTTPServer xxxx # python2
$ python -m http.server xxxx # python3
Serving HTTP on 0.0.0.0 port xxxx ...
See python doc for reference