You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
messages ã¨ãã« kernel: device eth0 entered promiscuous mode ã®ãããªãã°ãæ®ããªããªãã¾ãããã®ä»£ãããã®ãã¹ãå®ã¦ã®ãã±ãããããã£ããã£ããã¾ããã ã«ã¼ãã«ãã°ãç£è¦ããã¦ã¦ããã£ãããã£ããã£åºæ¥ã¾ãã -w file ãã£ããã£çµæããã¡ã¤ã«ã«åºåãããåºåããããã¡ã¤ã«ã¯ Wireshark ã§éãã¾ãã
tcpdump 㧠HTTP ã¿ã¦ãããã¾ãããæã®é·ã« 23:44 hirose31: ngrep -d any -W byline port 80 ä¾¿å© ã£ã¦ãããã¦ããããã° ngrep ã¨ããã£ããã¼ã£ã¦ãã¨ã§å¤§å¤ä¾¿å©ã§ããã@hirose31++ ã¡ãªã¿ã«ä»å㯠request å´ããç¹å®ã®ãã¹ãã®ã¿ã«éå®ãã¦ã¿ããã£ãã®ã§ $ sudo ngrep -W byline port 80 and host www.google.co.jp ã¨ãããã®ã§ãããããã§çã® HTTP ãããããã¿ãã¦å¹¸ãï¼ ã¡ãªã¿ã« tcpdump ã§ã¯ $ sudo tcpdump -l -s 1600 -nxX -i en0 host www.google.co.jp ã¨ããã£ã¦ã¾ããããªãã·ã§ã³ãããããã https://twitter.com/muranet/status/3118546330
Geoffâs site: The Silver Searcher: Better than Ack ggreer/the_silver_searcher · GitHub ãã¿ã¼ã³æ¤ç´¢ã«ã¯ackãå©ç¨ãã¦ãã¦ãé常å©ç¨æã«ã¯ç¹ã«ä¸æºã¯ç¡ãã£ããã§ããã ãã¡ã¤ã«æ°ãå¤ããã£ã¬ã¯ããªã ã¨é ãã£ãã®ã§ããã£ã¨ä»ã®æ¹æ³ãç¡ããã¨èª¿ã¹ã¦ããã ackã®3ã5åéãã¨ããThe Silver Searcherã¨ãããã®ã ãã£ãã®ã§å°å ¥ã The Silver Searcherã®ç¹å¾´ å ¬å¼ã«æ¸ãã¦ããThe Silver Searcherã®ç¹å¾´ ackã®3ã5åé«é .gitignoreã.hgignoreã«è¨è¼ããã¦ãããã®ãæ¤ç´¢å¯¾è±¡ããé¤å¤ æ¤ç´¢å¯¾è±¡ããé¤å¤ããããã¡ã¤ã«ã¯.agignoreã«è¨è¼ agã¨ããã³ãã³ãåã§ãackã¨æ¯ã¹ã¦ã³ãã³ããçã(33%æ¸!) ãªãé«éãªã®ã㯠https
grep ã® -o ãªãã·ã§ã³ã使ãã¨ãããããé¨åã ãåæãã¦ãããã ä¾ãã° <div>foo</div><div>bar</div> <div>baz</div> ã¨ããããã¹ããã¡ã¤ã« foo.txt ã«å¯¾ã㦠grep -o "<div[^>]*>[^<]*<\/div>" foo.txt ã¨å®è¡ãã㨠<div>foo</div> <div>bar</div> <div>baz</div> ãå¾ãããããããå¿ç¨ã㦠echo é¤åã®çå° | grep -o . ã¨ããã¨ é¤ å ã® ç å° ãå¾ãããã 便å©ï¼ï¼
ps ã¯ã¢ã¯ãã£ããªããã»ã¹ã®ãã¡é¸æããããã®ã®æ å ±ã表示ããã ããã»ã¹ã®é¸æã表示ãããæ å ±ãç¹°ãè¿ãæ´æ°ãããå ´åã¯ã 代ããã« top (1) ã使ããã¨ã ãã®ãã¼ã¸ã§ã³ã® ps ãåãä»ãããªãã·ã§ã³ã«ã¯ããã¤ãã®ç¨®é¡ãããã UNIX ãªãã·ã§ã³ãã¾ã¨ãããã¨ãå¯è½ã§ãåã«ã¯ããã·ã¥ãç½®ããªããã°ãªããªãã BSD ãªãã·ã§ã³ãã¾ã¨ãããã¨ãå¯è½ã§ãããã·ã¥ã使ã£ã¦ã¯ãªããªãã GNU ãã³ã°ãªãã·ã§ã³ãåã«äºã¤ã®ããã·ã¥ãç½®ãã å¥ã ã®ç¨®é¡ã®ãªãã·ã§ã³ã¯èªç±ã«æ··å¨ããã¦ãããã è¡çªãèµ·ãããããããªãã æ©è½çã«ã¯å ¨ãçãããå義ã®ãªãã·ã§ã³ãããã¤ãããã ããã¯å¤ãã®æ¨æºã¨ ps å®è£ ã«å¯¾ãã¦ã ãã® ps ãäºææ§ãæã£ã¦ããããã§ããã "ps -aux " 㯠"ps aux " ã¨ã¯ç°ãªããã¨ã«æ³¨æãããã¨ã POSIX 㨠UNIX æ¨æºã§ã¯ã"ps -a
odz buffer - ããã»ã¹ãéãã¦ãããã¡ã¤ã«ã確èªãã ls -l /proc/`pgrep -n java`/fd lsofã§ã調ã¹ããã¾ãã lsof - list open files lsof ãã«ããã«ãã¨çµæãåºã¦ãã¾ããããå¤ããã¦è¨³ããããã -pãªãã·ã§ã³ã§ããã»ã¹IDæå® ### ããã»ã¹IDæå® lsof -p 12345 ### ããã¯ã¯ã©ã¼ã使ãã¨ãããªæã lsof -p `pgrep -n java` -cãªãã·ã§ã³ã§ããã»ã¹åæå® lsof -c java -uãªãã·ã§ã³ã§ã¦ã¼ã¶æå® lsof -u hoge -iãªãã·ã§ã³ [@IPã¢ãã¬ã¹:ãã¼ãçªå·] listenãã¦ããã¼ããåºåãæå®ãããã¼ãã®ã¿è¡¨ç¤ºãããã¨ãã§ããã lsof -i # Listenãã¦ãã®ãããã表示 lsof -i :22 # ssh lsof -i :22,80
incron :: inotify cron system webistranoã§ãã¡ã¤ã«ããããã¤ãã¦ãè¨å®ã®åèªã¿è¾¼ã¿ããµã¼ãã¹åèµ·åãªã©ãå¿ è¦ãªéã«ã ãããã¤ã¦ã¼ã¶ãsudoã§reloadããrestartãªã©ãå®è¡ãã¦ããã®ãã 権éçã«ä½ã¨ãªãæ°ã«ãªã£ã¦ããã¡ã¤ã«ã®æ´æ°ãæ¤ç¥ã㦠èªåçã«reloadãrestartããæ¹æ³ã模索ãã¦ããã incronã¨ããè¯ãç©ããã£ãã®ã§æ¤è¨¼ã æ¤è¨¼ç°å¢ã¯Scientific Linux 6.2ã§ãã å®ç¾ãããã㨠ãããã¤ã¦ã¼ã¶ã¨ãµã¼ãã¹åèµ·åã¦ã¼ã¶ã®åé¢(sudo権éã®å¥å¥ª) Nagiosã®è¨å®ãã¡ã¤ã«ããããã¤ããããNagiosã®reloadãèªåã§ããã Passengerã®restart.txtçãªæãã§reload.txtãããªã¬ã¼ã§Nagiosã®reloadç㪠incronã®å°å ¥ incronãyumã§å°å ¥
ã·ã§ã«ããã§ãéãå¦çã¨ããã®ã¯ã¡ããã¡ãããã£ã¦ãä¾ãã°è¶ ãã«ããã°ãã¡ã¤ã«ã移åãã¦å§ç¸®ãããã¨ãããä»äºã¯ä¸çä¸ã®ããããå ´æã§æ¯æ¥è¡ããã¦ããããããã³ãã³ãã©ã¤ã³ããã§ã大éã®å§ç¸®æ¸ã¿ãã°ãã¡ã¤ã«ããã£ãºãã«å±éããããã¨ãã ãããã£ã¬ã¯ããªä»¥ä¸ã«åå¨ããããããã®ãã¡ã¤ã«ã(å§ç¸®æ¸ã¿ã®ãã®ãé¤ãã¦)å ¨é¨ bzip2 å§ç¸®ãããï¼ã¨æã£ãããã¨ããããããã£ã¨æ¬¡ã®ããã«ã³ãã³ãã©ã¤ã³ã§å©ãã°ããã $ find . -not -name '*.bz2' | xargs bzip2 ããã§ãã¾ããããªã«åé¡ãªãå¹ççã«bzip2å§ç¸®ãã§ãããã ããããã æè¿ã¯è¤æ°ã³ã¢ã®CPUãæ®éã«è»¢ãã£ã¦ããããã¾ã¤ããHyperThreadingãæå¹ã«ãªã£ã¦ãããã¦OSããè¦ããè«çCPUæ°ããã³ããªããæ®éã«8ã¨ãããããã®ä¸æ¹ã§è¤æ°ã³ã¢ã使ç¨ãã¦ãããã³ãã³ãã¨ããã®ã¯ããã¾ããªãã¦
⺠2014 (16) ⺠5æ (2) ⺠4æ (3) ⺠3æ (4) ⺠2æ (1) ⺠1æ (6) ⺠2013 (73) ⺠12æ (3) ⺠11æ (2) ⺠10æ (2) ⺠9æ (2) ⺠8æ (7) ⺠7æ (7) ⺠6æ (4) ⺠5æ (3) ⺠4æ (13) ⺠3æ (11) ⺠2æ (3) ⺠1æ (16) ⺠2012 (71) ⺠12æ (5) ⺠11æ (6) ⺠10æ (6) ⺠9æ (6) ⺠8æ (3) ⺠7æ (5) ⺠6æ (10) ⺠5æ (7) ⺠4æ (4) ⺠3æ (8) ⺠2æ (2) ⺠1æ (9) â¼ 2011 (83) ⺠12æ (5) ⺠11æ (2) ⺠10æ (2) ⺠9æ (1) ⺠8æ (10) ⺠7æ (4) ⺠6æ (2) â¼ 5æ (21) ãããã¯
ãããã£ã¬ã¯ããªã«ä»¥ä¸ã®ãã¡ã¤ã«ã¨ãã£ã¬ã¯ããªããã£ãå ´åã« dir1/ dir2/ file1 file2 lsã ãã ã¨ãã¹ã¦è¡¨ç¤ºãããã®ã§ããã¡ã¤ã«ã ã表示ããã©ã«ãã ã表示ããããã®ã§ããå¯è½ã§ããããï¼ ãã©ã«ãã ã表示ã®å ´å dir1/ dir2/ã ã表示ããããã®ã§ããæ¹æ³ããããã¾ããã ãããããé¡ããã¾ãã
http://tldp.org/LDP/abs/html/process-sub.html ã³ãã³ãã®å®è¡çµæãååä»ããã¤ãã§èªãããããã Command list enclosed within parentheses >(command_list) <(command_list) Process substitution uses /dev/fd/ files to send the results of the process(es) within parentheses to another process. man bash ã«ãæ¸ãã¦ãã£ãã æ¢ãæ±ãã¦ãæ©è½ã®1ã¤ã ãããç¥ããªãã£ãããä»ã¾ã§ã¯ã $ ./hoge > hoge.out $ ./fuga > fuga.out $ diff -u hoge.out fuga.outãããªé¢¨ã«tmpãã¡ã¤ã«ä½æãã¦diffã£
Linuxã«ã¼ãã«ãRuby on RailsãPerlãªã©ãè¿å¹´å¤ãã®å¤§è¦æ¨¡ããã¸ã§ã¯ãã§æ¡ç¨ããã¦ãããã¼ã¸ã§ã³ç®¡çã·ã¹ãã ããGitãã ãGitã«ã¯é常ã«å¤æ°ã®ã³ãã³ããç¨æããã¦ããããæ¥å¸¸çã«ä½¿ç¨ããã³ãã³ãã¯20åç¨åº¦ã¨è¨ããã¦ãããæ¬è¨äºã§ã¯ãGitã使ãããªãããã«è¦ããã¹ã20åã®Gitåºæ¬ã³ãã³ããç´¹ä»ããã Linuxã«ã¼ãã«ãRuby on RailsãPerlãªã©ãè¿å¹´å¤ãã®å¤§è¦æ¨¡ããã¸ã§ã¯ãã§æ¡ç¨ããã¦ãããã¼ã¸ã§ã³ç®¡çã·ã¹ãã ããGitãã ãGitã«ã¯é常ã«å¤æ°ã®ã³ãã³ããç¨æããã¦ããããæ¥å¸¸çã«ä½¿ç¨ããã³ãã³ãã¯20åç¨åº¦ã¨è¨ããã¦ãããæ¬è¨äºã§ã¯ãGitã使ãããªãããã«è¦ããã¹ã20åã®Gitåºæ¬ã³ãã³ããç´¹ä»ããã ãªããGitã®åºæ¬çãªèãæ¹ã使ãæ¹ã«ã¤ãã¦ã¯åæ£ãã¼ã¸ã§ã³ç®¡çã·ã¹ãã Gitå ¥éã§ãç´¹ä»ãã¦ããã®ã§ããã¡ããåç §ãã¦ã»ããã
grepã³ãã³ãã®æ¤ç´¢çµæãè²ä»ãã§ãããªãã¦ï¼ã®ç¶ãã grepã¨lessã®çµã¿åããã¯ãããã¾ãããã ããããããã®è¨äºã®æ¹æ³ã§ã¯ãlessã§ã®åºåããã¾ãè²ã¥ãããã¾ããã ãã¾ãè²ã¥ãããã«ã¯ã以ä¸ãå¿ è¦ã§ãã grepã®ãªãã·ã§ã³ã§ã --color=always ã使ã lessã®ãªãã·ã§ã³ã§ã -R ã使ã 1ã¤ç®ã¯ãgrepã®æ¤ç´¢çµæã常ã«è²ã¥ãããã®ã 2ã¤ç®ã¯ãlessã§ã®è¡¨ç¤ºã§ã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ã解éããããã®ã ãã®2ã¤ãè¨å®ãã¦ããã°ããã¾ãè²ã¥ããããçµæãlessã§è¦ããã¨ãã§ãã¾ãã
ãã©ã¤ãã·ã¼ã»ã¼ããªæ¤ç´¢ã¨ã³ã¸ã³ã¨ãã¦DuckDuckGoã¨ããã®ããããã¨ãã°ããåã«ç¥ã£ã¦ãã¾ã«ä½¿ã£ã¦ããã®ã ãããµã¨æãç«ã£ã¦iPhone/Safariããèªå® Macãè·å ´ã®PCãã¹ã¦ã®ãã©ã¦ã¶ã§ãããã©ã«ãæ¤ç´¢ã¨ã³ã¸ã³ãDuckDuckGoã«ããã DuckDuckGoã®ç´¹ä»ããã°ã§ã¯ãæ©è½çã«ã¯ã¾ã ç©è¶³ããªãããã¡ã¤ã³ã®æ¤ç´¢ã¨ã³ã¸ã³ã¯ãã¯ãGoogleã使ãã¨æãã¾ããã¨ãã£ãå 容ã大åã ã£ããèªåããã°ããã¯ããæã£ã¦ãã¦ãDuckDuckGoã®ä½¿ç¨ç¶æ³ã¯éå®çã ã£ãã ãããããæãç¥ã®å£°ãèãããã®ã§ããã ããããªãããããã使ãæ¹ãã¦ããã£ã¦ãä¸çã¯å¤ããããããã ãï¼ï¼ã ã¨ã èªåä¸äººã®é¸æã大ããä¸çãå¤ããããã¯ãããªããã¨ãããæ¿ç¥ãã¦ãããããã©ããã©ããªãã¼ã«ããããã¯ããä¸åº¦ä½¿ãåããããããªãã¨ãã®æ¬è³ªã¯ã¤ãããªãããæãä¸ããã°è¦ããªãã£ãä½ããè¦ã
解説ãã¼ã¸ã 㨠sed -e "s///" file > file2ã¨ããããã©ãåããã¡ã¤ã«ã«ä¿åããæ¹æ³ãæ¸ããã¦ããªãã ããå¿ãããæ¢ãã«ããã®ã§ã¡ã¢ã sedã§ãã¡ã¤ã«ã®ä¸èº«ãç´æ¥ç½®æãããã¨ãã¯ã次ã®ããã«-iãªãã·ã§ã³ã使ãã¨ããã¿ããã§ãã $ sed -i s/foo/bar/ baz.txtåãã«èª¿ã¹ãã¨ããmanã«ã®ã£ã¦ãªãã¦ã ãã¼ã£ã¦ãªã£ãã®ã§ããã $ export LANG=Cãããããã£ããã®ã£ã¦ãããã£ããã¡ããã¨å ¨é¨è¨³ããã¨ã http://kanolog.jp/2007/11/sed_f07c.html ãããããããããï¼
ã¨ã³ã¸ãã¢ãç¹ã«ã¦ã§ãç³»ã®ãä»äºããã¦ããã¨ãããã« windows ã mac ã好ãã§ã linux ã BSDï¼mac ãä»ã BSD ã§ããããï¼ã§ä½æ¥ããæéãå§åçã«é·ããªãã¾ããããããã大æµã®å ´å X ããªã CUI ãªç°å¢ã§å»¶ã ä½æéãä½æ¥ããããã§ãã ã§ãåã ããããªã®ã§ããããã®æéã®ã»ã¨ãã©ã¯ãããã¹ãå¦çãã«ãã¦ãããããã§ããTSV ãã¡ã¤ã«ãç¹å®ã®é ç®ã§ä¸¦ã¹æ¿ãããããã°ãã¡ã¤ã«ããä½ãã®é ç®ãæãåºãã¦(UA ã¨ã)ãããã種é¡ãã¨ã«ã«ã¦ã³ããã¦ã½ã¼ããã¦åºãããã ãããªè¨³ã§ UNIXç°å¢ã§ perl ã sedãawk çã®æååå¦çãå¾æãªã¹ã¯ãªããè¨èªãè¯ã使ãããã«ãªãã¾ããããã¡ãã£ã¨ãããã®ã§ããã° perl ã§çãã¹ã¯ãªãããæ¸ãã¦ãã¾ãã°OKãªã®ã§ããããããããå ¥ã£ã¦ããã³ãã³ãã使ãã ãã§ãç¸å½ã®äºãã§ãããªãã¨æè¿æã£ãã®ã§ã¡ã¢ã§ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}