Apr 3, 2009

One-Line-Web-Server For File Sharing

Today, I learn a way to create a web server within one-line. This allows me to share files with browser access from remote.

TCP port 80

~# python -c "import sys,SimpleHTTPServer;sys.argv=[None,80];SimpleHTTPServer.test()"

Or TCP port 8000

~# python -m SimpleHTTPServer