Sharing a directory through HTTP in one line

Sometimes I find myself wanting to transfer one (or several) file to a different host or mobile device, and getting the USB cable or using SSH is not always possible. In those cases I just use this super-silly Python one-liner:

saghul@hal:~$ cd Downloads/
saghul@hal:~/Downloads$ python -m SimpleHTTPServer
Serving HTTP on port 8000 ...
view raw gistfile1.txt hosted with ❤ by GitHub

And there you go.

Leave a Reply