There can be times when you want to share a file or directory with colleagues. Here’s a really simple way to do that (assuming you have Python installed):
$ python -m SimpleHTTPServer
Now you and your colleagues can browse all files in and under the directory in which you ran the command above by accessing http://your-ip-address:8000
.
Try it now: run the above command, and go to http://127.0.0.1:8000
Enhancement
If you have a file called index.htm
or index.html
in the directory, that will be shown instead of the file listing.
Caveats
There’s no security. Anyone who can access your workstation will have access to the files in and below the directory from which you ran the command. Your internal security policies may prohibit this kind of file sharing.
Could This Linux Tip Be Improved?
Let us know in the comments below.