Wednesday, July 29, 2009

How to Share Files quickly in Ubuntu / Debian Linux

In the very first day of my python study, I wondered!!!
Some time we need to share files to other systems in our computer center quickly with out any tools in hand. If you have a python installation in your system, file sharing is very simple by implementing a little http server, using a single line command.

Suppose If you want to share the folder /home/shibu/ and my IP address is

open a terminal then type following
$ cd /home/shibu

$ python -m SimpleHTTPServer

Now your http server will start in port 8000
( You will get a message - Serving HTTP on port 8000 ... )

Now you can open a browser in the remote machine and type the following in the address bar

If you are a network administrator it is very useful, normal users can also use this trick.

you can test it locally by using