If you need a quick and easy method for sharing files between computers, and you don't want to configure the Apache Web server, or something similar, then Python can help.Python
comes with a built-in module called SimpleHTTPServer or Python 3 http.server
that allows you to share any directory on your system, just like a web server directory.
This is especially useful for sharing files between computers within a local network.
For example, suppose you want to share the files inside ~ /shared directory and the local host IP address 192.168.2.100 :
While "shared" can be, any directory on your system.
More info on Python:http://www.python.org/
$ cd ~/shared
$ python -m SimpleHTTPServer
The above command will start the HTTP server
that serves the port 8000
Then, open a Web browser and enter the following address:http://192.168.2.100:8000
If you use Python 3
, instead of python-m SimpleHTTPServer
use the command:
$ Python-m http.server
To change the port using the command:
$ Python-m SimpleHTTPServer 8080
$ Python-m http.server 8080
On most Linux distributions Python comes installed by default. Windows users can download it here :http://www.python.org/download/windows/