|
|
01-01-2013
, 01:51 PM
|
|
Posts: 208 |
Thanked: 253 times |
Joined on Oct 2009
@ Helsinki, Suomi (Finland)
|
#1
|
|
|
01-01-2013
, 01:58 PM
|
|
Posts: 208 |
Thanked: 253 times |
Joined on Oct 2009
@ Helsinki, Suomi (Finland)
|
#2
|


# apt-get install python
$ chmod 755 ~/bin/httpshare
$ httpshare . $ httpshare ~/MyDocs/Movies $ httpshare /etc
develsh -c "python -m SimpleHTTPServer $port > /dev/null"
develsh -c "python -m SimpleHTTPServer $port > /dev/null 2>&1"
| The Following 8 Users Say Thank You to ladoga For This Useful Post: | ||
|
|
01-01-2013
, 02:20 PM
|
|
|
Posts: 3,637 |
Thanked: 2,420 times |
Joined on Jan 2010
@ Israel
|
#3
|
| The Following User Says Thank You to Schturman For This Useful Post: | ||
|
|
01-01-2013
, 02:32 PM
|
|
|
Posts: 3,637 |
Thanked: 2,420 times |
Joined on Jan 2010
@ Israel
|
#4
|
|
|
01-01-2013
, 02:44 PM
|
|
Posts: 208 |
Thanked: 253 times |
Joined on Oct 2009
@ Helsinki, Suomi (Finland)
|
#5
|
I have a question.. Instead exiting with Pressing "Ctrl" + c how I can exit with command ?
$ ps -Af | grep HTTP
$ kill [PID]
$ pid=`pgrep -f HTTP`; kill $pid
| The Following User Says Thank You to ladoga For This Useful Post: | ||
|
|
01-01-2013
, 02:58 PM
|
|
|
Posts: 3,637 |
Thanked: 2,420 times |
Joined on Jan 2010
@ Israel
|
#6
|
| The Following User Says Thank You to Schturman For This Useful Post: | ||
|
|
01-01-2013
, 05:23 PM
|
|
|
Posts: 344 |
Thanked: 252 times |
Joined on Apr 2012
@ Hamburg
|
#8
|

|
|
01-01-2013
, 06:36 PM
|
|
|
Posts: 3,637 |
Thanked: 2,420 times |
Joined on Jan 2010
@ Israel
|
#9
|
|
|
01-01-2013
, 07:49 PM
|
|
Posts: 208 |
Thanked: 253 times |
Joined on Oct 2009
@ Helsinki, Suomi (Finland)
|
#10
|
#!/bin/sh
pid=`pgrep -f SimpleHTTPServer`
dir="/home/user/MyDocs/Movies"
if [ -z $pid ]
then
cd $dir
develsh -c "python -m SimpleHTTPServer 80"
else
kill $pid
fi
![]() |
| Thread Tools | Search this Thread |
|