Use your desired directory as a temporary server

by shaiekh on January 7, 2011

Today i had to copy some files to my colleague’s machine from mine through scp. This was boring task as i had to run same command for eight machine. Then i was informed about a simple python script, through which I made that directory as a temporary http server and then send a broadcast message of accessing my drive through browser. Followings are the step i had taken:

  • Went to the directory which contains the files those i had to share and write python script:
python -m SimpleHTTPServer 8887

N.B.8887 is assigned port number. I worked in ubuntu.

  • See following screenshots what was happened:

{ 5 comments… read them below or add one }

ekram January 7, 2011 at 11:17 am

super cool….

Reply

Oronno January 7, 2011 at 10:58 pm

nowhere u mention that, it work with linux or windows or in both??
Did you try it on windows? :P :D

Reply

shaiekh January 8, 2011 at 12:00 am

Mentioned after code line. “N.B.8887 is assigned port number. I worked in ubuntu.”

Reply

ekram January 20, 2011 at 1:52 pm

may be you need admin permission to run on knows protocol ports. like 25,80,444 etc.

Reply

Shrayas April 14, 2011 at 1:21 pm

Hey man. This is awesome .

I’m just wondering , do you know how i can style this ? Or is it not possible ? I dont quite understand the concept . Could you help me out please.

Reply

Leave a Comment

*

Previous post:

Next post: