![]() |
2013-01-01
, 17:51
|
Posts: 230 |
Thanked: 302 times |
Joined on Oct 2009
@ Helsinki, Suomi (Finland)
|
#1
|
![]() |
2013-01-01
, 17:58
|
Posts: 230 |
Thanked: 302 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: | ||
![]() |
2013-01-01
, 18:20
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#3
|
The Following User Says Thank You to Schturman For This Useful Post: | ||
![]() |
2013-01-01
, 18:32
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#4
|
![]() |
2013-01-01
, 18:44
|
Posts: 230 |
Thanked: 302 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: | ||
![]() |
2013-01-01
, 18:58
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#6
|
The Following User Says Thank You to Schturman For This Useful Post: | ||
![]() |
2013-01-01
, 21:23
|
|
Community Council |
Posts: 664 |
Thanked: 1,648 times |
Joined on Apr 2012
@ Hamburg
|
#8
|
![]() |
2013-01-01
, 22:36
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#9
|
![]() |
2013-01-01
, 23:49
|
Posts: 230 |
Thanked: 302 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