Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| tips:threelinestip [2012/11/20 20:07] 193.164.137.40 [Linux - Top 10 CPU-hungry apps] | tips:threelinestip [2015/01/07 07:47] (current) mrizvic run local/remote webserver with python | ||
|---|---|---|---|
| Line 106: | Line 106: | ||
| </ | </ | ||
| + | ===== Local/ | ||
| + | |||
| + | Serve files on port 8000 for anybody from the directory from where you start this command: | ||
| + | |||
| + | python 2.x | ||
| + | <code bash|> | ||
| + | python -m SimpleHTTPServer | ||
| + | </ | ||
| + | |||
| + | python 3.x | ||
| + | <code bash|> | ||
| + | python -m http.server | ||
| + | </ | ||
| + | |||
| + | If other port is desired (for example 9000) then add port number to the command: | ||
| + | <code bash|> | ||
| + | python -m SimpleHTTPServer 9000 | ||
| + | </ | ||
| ===== resolving IP Addresse (nmap) ===== | ===== resolving IP Addresse (nmap) ===== | ||
| Line 146: | Line 164: | ||
| -density 300 -quality 80 $file `echo $file | sed ' | -density 300 -quality 80 $file `echo $file | sed ' | ||
| + | ===== rename upper to lowercase in bash ==== | ||
| + | |||
| + | for x in *.JPG; do y=$(echo $x | tr ' | ||
| ===== Find duplicate files in Linux ===== | ===== Find duplicate files in Linux ===== | ||
| Line 169: | Line 190: | ||
| wget --mirror -w 2 -p -r -np --html-extension --convert-links -R xmlrpc.php, | wget --mirror -w 2 -p -r -np --html-extension --convert-links -R xmlrpc.php, | ||
| + | |||
| + | ===== Find processes utilizing high memory in human readable format ====== | ||
| + | ps -eo size, | ||





