unixã®å½¹ç«ã¤TIPSãããã
/dev/null ããªãã¤ã¬ã¯ã 㨠rm ã®éã
â /dev/null ããªãã¤ã¬ã¯ã 㨠rm ã®éã rm ã¯ãã¡ã¤ã«ãã®ãã®ãåé¤ãã¦ãã¾ããããä¾ãã°squidã®access.logãsendmailã® maillogãªã©ãããã»ã¹ãéãã¦ãããã¡ã¤ã«ãµã¤ãºãè¥å¤§åããã¨ãã®å¯¾å¦ã¨ãã¦ã¯é© åã§ã¯ãªãã cat /dev/null > access.log ã¨ãã¦ãããã¨ã§ãããã»ã¹ã«å½±é¿ãä¸ããã«ãã°ãã¡ã¤ã«ã®ãã¡ã¤ã«ãµã¤ãºã0ã«ã§ã ãã
ãã£ãã·ã¥ãã¡ã¤ã«ã®åé¤ã¨ãã«ãããããããªãã
/dev/null ã¸ã®ã·ã³ããªãã¯ãªã³ã¯
â /dev/null ã¸ã®ã·ã³ããªãã¯ãªã³ã¯ ä¾ãã°ãã°ãè¦ããªãæ㯠# rm access.log ã®å¾ã # ln -s /dev/null access.log
Apacheã®ãã°ä¿åããããã¨ãã¨ããããªãã¨ããå¤ããã¨ãã«Apacheã®åèµ·åã¨ãããªãã¦ãããªãã/dev/nullã¯ããã使ãããªãã
foræã«ããé£ç¶å¦ç
â foræã«ããé£ç¶å¦ç ä¾ãã°100åãããã¡ã¤ã«ã®æ¡å¼µåãå ¨ã¦å¤æããã«ã¯ã for i in *.doc do mv $i `echo $i | sed s/doc$/txt/` done ã«ã¬ã³ããã£ã¬ã¯ããªå ã®zipãã¡ã¤ã«ãä¸æ°ã«å ¨é¨è§£åããã«ã¯ã for i in *.zip do unzip $i done ãããã¯ãã¡ã¤ã«ã®æä½ãè¡ãã®ã§ããã¹ãæãã¨ãã¯ã³ãã³ãåå ¨ä½ãechoã®å¼æ°ã«ã ãã°ç¢ºèªãã§ããã for in in *.doc do echo "mv $i `echo $i | sed s/doc$/txt/`" done ä¾: dvi2ps ã¨ã®é£æº for i in *.dvi do dvi2ps $i.tex | lpr done â»ãtoãç³»ã®ããã°ã©ã ãªãä½ã«ã§ãå¿ç¨ãå¹ãããã¡ã¤ã«ã«ãªãã¤ã¬ã¯ãããå ´ ãåã¯sedãæãã§ãã¡ã¤ã«åãæ´å½¢ããã¨è¯ãã ä¾: plain2 for i in *.txt do plain2 -tex `echo $i | sed s/txt/tex/` done
foræã¯ãã£ããã«èº«ã«ã¤ãããã£ã¨ã
ssh ã«ããæå·åéä¿¡ã®æé
â ssh ã«ããæå·åéä¿¡ã®æé 1.ã¯ã©ã¤ã¢ã³ãã§æå·éµãçæããã $ ssh-keygen -d ... Enter passphrase (empty for no passphrase): Enter same passphrase again: ... ~/.ssh ã«ç§å¯éµ(id_dsa)ã¨å ¬ééµ(id_dsa.pub)ã®2ã¤ã®éµãçæãããã 2.ãµã¼ãã¼ã«å ¬ééµã転éããã ãµã¼ãã¼ä¸ã®ãã¼ã ãã£ã¬ã¯ããªã« .ssh ãã£ã¬ã¯ããªãä½æããããã®ã㣠ã¬ã¯ããªã«å ¬ééµã®id_dsa.pubã転éããrenameã¾ãã¯ãªãã¤ã¬ã¯ã㧠authorized_keys ã¨ããå¥ã®ãã¡ã¤ã«ã«ä¸èº«ãå ããã è¤æ°ã®ã¯ã©ã¤ã¢ã³ãããä¸ã¤ã®ãµã¼ãã¼ã¸ãã°ã¤ã³ããå ´åã¯ã¯ã©ã¤ã¢ã³ãã ã¨ã«å ¬ééµãå¿ è¦ã«ãªãã®ã§ããã¹ã¦ authorized_keys ã«å ¬ééµãã¾ã¨ãã å¿ è¦ãããã â» SSH1ã¨SSH2ã§authorized_keysãéãã¯ãããã®è¾ºã調ã¹ãã
ãã¾ã¾ã§puttykeygenã§ãã£ã¦ãã
tcpdump
â tcpdump tcpdump ã§ã¯ç£è¦ã®å¯¾è±¡ã¨ãªããã¼ããæå®ã§ããã # tcpdump not src port 23 and not dst port 23 src dst not ããããå ãã¦andã§è¤æ°æå®ãã¾ããã¹ãå表示ã«DNSã«ãã¯ã¢ãããææ¢ããã«ã¯ã -n ãªãã·ã§ã³ã使ãã # tcpdump -n src port 80 or dst port 80 ãã¨ãã°DNSã«ãã¯ã¢ããã®é 延æéã調ã¹ãå ´å # tcpdump -n src port 53 or dst port 53 ã¨ããã 03:47:26.510713 133.2.103.130.32768 > 133.2.103.5.53: 61366+[|domain] (DF) 03:47:26.512811 133.2.103.5.53 > 133.2.103.130.32768: 61366*[|domain] (DF) 03:47:26.521361 133.2.103.130.32768 > 133.2.103.5.53: 49978+[|domain] (DF) 03:47:26.522912 133.2.103.5.53 > 133.2.103.130.32768: 49978*[|domain] (DF) ã¨åºåãããã+ ãå§ç¹ãã¾ãããããã¿ãã¨DNSã¸ã®åãåããã¯32768ããåºã¦ã buturi ã® 53 ãã¼ãã¸ãã±ããã¯æµããå¿çãã±ããã¯buturiã®53ããgenovaã® 32768ã¸å¸°ã£ã¦ãã¦ãããã¨ããããã
ãããããããããã
bash ã®è¡ç·¨éç¨ãã¼ãã¤ã³ã
â bash ã®è¡ç·¨éç¨ãã¼ãã¤ã³ã C-a ã«ã¼ã½ã«ãè¡é 㸠C-b ã«ã¼ã½ã«ã1ã¤å·¦ã¸ C-c ãã©ã¢ã°ã©ã¦ã³ãã§å®è¡ä¸ã®ã¸ã§ããçµäº C-d ã«ã¼ã½ã«ç´ä¸ã®1æåãåé¤/ãã°ã¢ã¦ã C-e ã«ã¼ã½ã«ãè¡æ«ã¸ç§»å C-k ã«ã¼ã½ã«ããå³å´ã®æååãã«ãã(ãã«ãããã¡ã¸ç»é²) C-l ç»é¢å ¨ä½ãã¯ãªã¢ C-m æ¹è¡ C-u è¡å ¨ä½ãã¯ãªã¢ C-w ãã¼ã¯ããã«ã¼ã½ã«ä½ç½®ã¾ã§ãã«ãã(ãã«ãããã¡ã¸ç»é²) C-y ãã«ãããã¡ã®å 容ãè²¼ãä»ã(ã¤ã³ã¯) C-@ ãã¼ã¯éå§ (C-SPACEã¨åæ§)
è¦ãããã