Lokvin Wiki

ref doc[]


  • Transfer a url
  • curl post method, curl -d (--data)
curl -d 'hi, the content' http://localhost:3003
  • curl get method
curl http://localhost:3003
// -D - , dump header to standard output
// -# , progress bar
lokvins-MacBook-Pro:yufei lokvin$ curl -# -D - -o /dev/null -H "User-Agent:iphone" "http://www.reuters.com" 
HTTP/1.1 302 Moved Temporarily
Server: AkamaiGHost
Content-Length: 0
Location: http://mobile.reuters.com/do/urlRedirect?URL=http%3A%2F%2Fwww.reuters.com/
Date: Wed, 02 Jul 2014 14:26:32 GMT
Connection: keep-alive
Vary: User-Agent
//download specify html response to r.html file


  • non-interactive network downloader, supports http, https, ftp
# -O file, if - used as file, documents will be printed to standard output
wget -O - "http://www.reuters.com"
wget -O r.htm "http://www.reuters.com"


 1) screen -L -d -RR -S buildmaster;  -> Start a screen as the buildmaster user;
 1) screen -S buildmaster -> also start new screen
 2) screen -x;  -> resume to last screen;
 n) screen -list -> show available screen list
 3) ctrl-a d;   -> quit current screen, Detached;
 4) ctrl-a 1/2/3/4...;   -> switch in different window;
 5) ctrl-a c;   -> Create a new window in the screen;
 6) ctrl-a shift-A;  -> Change the window name in the screen;
 7) ctrl-a "  -> list all window
 8) ctrl-a [ + arrow key -> copy mode, can roll screen, press "Esc" exit from copy mode
 10)ctrl-a + K -> kill current window
 11)ctrl-a + ctrl-n -> move to next window
 12)ctrl-a + ctrl-Backspace -> move to previous window 
13)ctrl-a + a, move cursor to the line begin

screen guide : http://magazine.redhat.com/2007/09/27/a-guide-to-gnu-screen/


  • find, walk a file hierarchy
  • find by name in specify folder
shell> find ~/.m2 -name "commons-beanutils-*.jar"
## find in two folder ~ and ~/.m2 for name is commons-beanutils-*.jar 
shell> find ~ ~/.m2 -name "commons-beanutils-*.jar"
## find by name and case insensitive
shell> find ~/.m2 -iname "commons-beanutils-*.jar"
## find file modified time less than 1 day, this command very useful for finding prod issue
shell>find . -mtime -1
## find file modified time larger than 1 day
shell>find . -mtime +1 
## find file modified time less than 60 minutes
shell> find . -mmin -60