Of course there are a million ways to do so (Samba, AFS, NFS, SSH, FTP et cetera), but I think this is the easiest way you’ve ever seen. It is called SimpleHTTPServer and the only requirement is that you have Python installed, which is the case for most Linux systems.  You use it like this:

python -m SimpleHTTPServer

This will launce a simple webserver serving you currect directory via port 8000. It is obvious that this page will only be accessible when this port isn’t firewalled. When you acces this page it will show you something like this:

Browser Listing

Browser Listing

And what you see on the console is:

Python Server SimpleHTTPServer

Python Server SimpleHTTPServer

To have this command always with you, simply create an alias in your .bashrc:

alias pyServ='python -m SimpleHTTPServer'

As said before, by default the server listens on port 8000. If we would like it to listen on 8001 that’s also possibe. Just add another parameter:

python -m SimpleHTTPServer 8001

Two other, related, (Python written) file sharing utilities I came across a while ago are Droopy and Woof. Have a look at them the’re quite handy too!


No Comment.

Add Your Comment