Macã«å ¥ã£ã¦ããsedã¯BSDçsedã¨ããããã¤ã§ãLinuxãªã©ã«å ¥ã£ã¦ããGNUçsedã¨ã¯æ§ã ãªç¹ã§ä»æ§ãç°ãªãã¾ãã ä¸ã§ãå¼ã£ããããããã®ããã¡ã¤ã«ä¸æ¸ããªãã·ã§ã³ã®-iã«ã¤ãã¦ã§ããããã¾ãã¡ããã¨èª¬æããè¨äºãè¦å½ãããªãã®ã§ã¾ã¨ãã¦ããã¾ãã 以ä¸ã®ãããªã³ãã³ããå®è¡ããã¨ãBSD sedã§ã¯æå³éãã«å®è¡ããã¾ããã $ echo aaabbbcc > hoge.txt $ sed -i 's/aaa/zzz/' hoge.txt # BSD sed sed: 1: "hoge.txt": extra characters at the end of h command $ gsed -i 's/aaa/zzz/' hoge.txt # GNU sed $ cat hoge.txt zzzbbbcc
ã ãããåºæ¬çã«Linuxåæã§æ¸ããã¦ãã ã°ã°ã£ã¦ããã¿ã¤ããã®ã¯ä»¥ä¸ã®ã¯ã³ã©ã¤ãã¼ grep -r hoge * | xargs sed -i "s/hoge/hufa/g" ããã£ã¦ã話ããã¾ãèããªãéãã¯ããã¶ãããã§åºæ¬çã«ã§ãããã ããã Macã ã¨sedãããã ããããMacã®sedã¯BSDçµç±ã®sedãããã¦ãGNUçã®sedã¨ã¯éãããããã ãã -i ãªãã·ã§ã³ãã¤ãããªãã£ããã¨ãããã¨ã§brewã§gnu-sedããããportçãã¡ããã¨ããããã brew install gnu-sedã³ãã³ã㯠gesd ã«ãªãããã¨ã¯gnu-sedãªã®ã§ãã¤ãã©ãããªsedã使ãããã¨æã ããããã¸ã§ã¯ã以ä¸ã®æååãä¸æ¬å¤æãããã£ã grep -rl hoge ./ | xargs gsed -e -i "s/hoge/hufa/g"ã§ãããï¼ï¼ï¼ï¼ @xxxxx
ã·ã§ã«ã¹ã¯ãªããã§ããã°ï¼è¡ç®ã« #!/bin/sh ã¨æ¸ãã¨æãã®ã§ããã1è¡ç®ã®ååãæåã«ã¤ãã¦ããåãã£ã¦ãªãã£ãã®ã§èª¿ã¹ã¦ã¿ã¾ããã åå ã·ãã³ (Unix) - Wikipedia ã·ãã³ã¾ãã¯ã·ã§ãã³ (shebang) ã¨ã¯UNIXã®ã¹ã¯ãªããã®#!ããå§ã¾ã1è¡ç®ã®ãã¨ãèµ·åãã¦ã¹ã¯ãªãããèªã¿è¾¼ãã¤ã³ã¿ããªã¿ãæå®ããã hash-bangã¾ãã¯sharp-bangã¨ãè¨ãããå¾è ã縮ããshebangã¨ããå¼ã³æ¹ãä¸è¬çãã¤ã·ã³ãã«ã§ããã ã·ãã³ã¨ããã®ã§ããã ç¨èªé:ã·ã§ãã³ã°: UNIX/Linuxã®é¨å± ãã®ã#!ãã®ãã¨ããã·ã§ãã³ã°ã(shebang) ã¨å¼ã¶ãã¾ãããã®è¡å ¨ä½ããã·ã§ãã³ã°è¡ãã¨å¼ã¶ãã¨ããããã·ã§ãã³ã°ã®èªæºã¯ãsharp bangããshell bangããªã©ãããã¤ãããããã ã ãªãã#! ãªã®ã ç¨èªé:ã·ã§ãã³ã°: UNI
GNU/Linuxã«æ £ãã¦ãã¨ãããæã¤top/ps/netstatãOS X使ã£ã¦ãã¨ãã«Linuxã®ããã¨å ¨ç¶ã¡ããæåã§ä½¿ãã«ãããåãæåã«ããã®manè¦ã¦ãç¡çãããªãã§ããªãã¨ãåãããã«ä½¿ããã®ãªãã調ã¹ã¦ã¿ãã top htopãªãLinuxã¨OS Xã§åãããã«ä½¿ããã®ã§htopã使ãã¨ããããã brew install htop-osx ps psã®ãã代æ¿ã¯è¦ã¤ãããªãã£ããã©ãps auxfã®ããã«ããªã¼è¡¨ç¤ºãããã¨ãã®ä»£æ¿ã¯pstreeã使ãã¨ããããã brew install pstree netstat netstatã¯netstat -tnpaã¨ãnetstat -tnplããã使ããã©ãåè ã¯lsof -nP -iTCPãå¾è ã¯lsof -nP -iTCP -sTCP:LISTENã§ä»£æ¿ã§ãããã $ sudo lsof -nP -i4TCP -sTC
Mac OS Xã§ã¯ãFinderãã確èªã§ããªãä¸å¯è¦ãã©ã«ããå¤ãåå¨ãã¾ãããã®ãããFinderãã確èªã§ãããã¡ã¤ã«å®¹éã®åè¨ã¨ãã£ã¹ã¯ã®ä½¿ç¨é åã®éã«æ°GBã®å·®ãçãã¾ãããããã¯åé¡ããã¾ããããããããã®å·®ã10GBãè¶ ãã¦ãããã使ç¨ä¸ã«ãã使ãã®èµ·åãã£ã¹ã¯ã¯ã»ã¨ãã©ä¸æ¯ã§ããã¨ã¨ã©ã¼ãåºãããããªã«å¤§ããªãã¼ã¿ãä¿åãããããªä½æ¥ãããè¦ãã¯ãªãçã¨ãã£ãå ´åã«ã¯ãåå ãç¹å®ããå¿ è¦ãããã¾ãããã ãFinderããã¯ç¢ºèªã§ããªãä¸å¯è¦ãã©ã«ãã«å·¨å¤§ãªãã¡ã¤ã«ãä½æãããã±ã¼ã¹ãå¤ããåå ç¹å®ã¯å®¹æã§ã¯ããã¾ããã ãã®ããã¥ã¡ã³ãã«ã¯ãåå ç¹å®ã«å¿ è¦ãªæä½ãã¾ã¨ãã¦ãã¾ããåé¡è§£æ±ºã®ä¸å©ã¨ãªãã°å¹¸ãã§ãã [1] ã´ãç®±ã空ã«ãã ãã¡ã¤ã«ããã©ã«ãã¯ã´ãç®±ã«å ¥ããã ãã§ã¯åé¤ãããªãã®ã§ãã´ãç®±ã«ãã¡ã¤ã«ãæºã¾ã£ã¦ããããã§ããã°ãã´ãç®±ã空ã«ããããå®è¡ããã
-rãªãã·ã§ã³ã-dãªãã·ã§ã³ã§æå»ãæå®ããªãå ´åã¯ãç¾å¨ã®æå»ãè¨å®ããããã¾ãã-aãªãã·ã§ã³ã-mãªãã·ã§ã³ãæå®ããªãå ´åã¯ãæ´æ°æ¥æã»æçµåç §æ¥æã®ãã¹ã¦ãè¨å®ãããã å ·ä½çã«ã¯ã以ä¸ã®ããã«æå®ããã $ touch -a file1.txtãâæçµåç §æ¥æãç¾å¨ã®æ¥æã«å¤æ´ $ touch -r file1.txt -m file2.txtãâæ´æ°æ¥æãfile1.txtã¨åãã«å¤æ´ $ touch -d "2 February 2002 10:00am" file1.txtãâæ´æ°ã»æçµåç §æ¥æã2002å¹´2æ2æ¥ã®åå10æã«å¤æ´
CakePHP 1.3.4ããªãªã¼ã¹ãããæ§ãªã®ã§ãã¦ã³ãã¼ããã¾ããã ããã¯ããã¨ãã¦ãMacã§ä½ããã¦ã³ãã¼ããããã¡ã¤ã«ã ls ã³ãã³ãã§è¦ãã¨ããã¼ããã·ã§ã³ã®å³ã«è¬ã® @ ãããã¾ãã MacBookã«MongoDBãã»ããã¢ãããã¦ã¿ãã - kanonjiã®æ¥è¨ ã§ã軽ãæ¶ãæ¹ãæ¸ãããã§ããããã®æã¨ã¯ã¡ãã£ã¨å¤ãã£ãã®ã§ã¾ã¨ãã¾ãã ç°å¢ Mac Mac OS X 10.5.8ï¼Leopardï¼ @ ã®æ£ä½ EA (Extended Attributes)ã¨ã¯ Leopardã®è©±ã«å ¥ãåã«ãTigerã§å°å ¥ããããã¡ã¤ã«ãªã½ã¼ã¹ãEA (Extended Attributes)ãã«ã¤ãã¦èª¬æãã¦ããããACL(Access Common List)ãTigerãããµãã¼ããããããããã©ã«ãã§ã¯ç¡å¹åããã¦ãããããããã§ã¯çç¥ããã EAã¯ãã¡ã¿ãã¼ã¿ã¨ç·ç§°ãããã
æ£ç´ããµã¼ãã¯åãããªããã¨ã ããã ãã¤ãã®ããã«SSHã§ãã°ã¤ã³ãããã¨æã£ããããssh_exchange_identification: Connection closed by remote hostãã¨ããã¨ã©ã¼ãåºãã 調ã¹ã¦ã¿ãããä½ã®ãã¨ã¯ãªããIPå¶å¾¡ãã¦ãããã§ãï¼ã/etc/hosts.allowããã®ãã¡ã¤ã«ãè¦ç·¨éï¼ã ã§ãã¢ã¯ã»ã¹ã§ããªãããã©ãããã¼ã¨æã£ãããã©ã使ã£ã¦ããã®ãWebARENA SuitePROv2ã ã£ãã®ã§ããããç°¡æã³ã³ããã¼ã«ããã«ã«è¨å®ã§ããã¨ããããã£ããªã¼ã¨â¦ æã£ãéããSSHã®ã¢ã¯ã»ã¹å¶å¾¡ãã¨ããç»é¢ããã£ã¦ãããã«IPã追å ã§ããã 念ã®ãããç·¨éãã¡ã¤ã«ã«ã¤ãã¦è¦ãæ¸ãã ã/etc/hosts.allowãã«è¨±å¯ããIPã¢ãã¬ã¹ã以ä¸ã®ããã«è¨è¿°ï¼è¤æ°ããã°ãããè¤æ°è¨è¿°ï¼ sshd : [IPã¢ãã¬ã¹1] sshd
å¼æ°ãå¦çãã å¼æ°ã¨ã¯ï¼ å¼æ° (ã²ããã) ã¨ã¯ã³ãã³ã (ã·ã§ã«ã¹ã¯ãªãã) å®è¡æã«ãã³ãã³ãã©ã¤ã³ãã渡ãããå¤ã®ãã¨ã§ããã å¼æ°ã¯å®è¡æã«ããã°ã©ã å ã§åç §ãããã·ã§ã«ã¹ã¯ãªããã®å®è¡çµæ (åä½) ã«å½±é¿ãä¸ãããå¼æ°ã¯ãã©ã¡ã¼ã¿ã¨å¼ã°ãããã¨ãããã â ã³ãã³ãåã«ç¶ãã¦å¼æ°ã¨ãã¦ã³ãã³ãã«æ¸¡ãããå¤ã®ãªã¹ããæå®ããã å¼æ°ã¯ã³ãã³ãåã«ç¶ãã¦ã¹ãã¼ã¹åºåãã§æå®ãããå¼æ°ã¨ãã¦æå®å¯è½ãªå¤ã®æ°ã¯åã³ãã³ãã«ããç°ãªãã ãåèã å¼æ°ã¨ãªãã·ã§ã³ ã³ãã³ãå®è¡æã«æå®ããå¤ã«ã¯å¼æ°ã¨ãªãã·ã§ã³ããããå¼æ°ã¯å®è¡ã«ä½¿ç¨ããããã¡ã¤ã«åãåºåãããã¡ãã»ã¼ã¸ãªã©ãæå®ããã®ã«ä½¿ç¨ãããã ä¸æ¹ããªãã·ã§ã³ã¯ -f ãªã©ã®ããã« - (ãã¤ãã³) ã¨ã¢ã«ãã¡ããã1æåã§è¡¨è¨ããã主ã«ã³ãã³ãã®æ¯ãèãæ¹ãæå®ããç®çã§ä½¿ç¨ããããã®ã§ããã ã¾ãããªãã·ã§ã³ã¯ -a -
調ã¹ã¦ã¿ããåä½ç¢ºèªç¨ã®ãµã¼ã㯠plackup ã§ç«ã¦ã¦ããã app.psgi ã®ä¸èº«ã¯ä¸çªæå¾ã«ã --data (-d, --data-ascii) application/x-www-form-urlencoded å½¢å¼ã§ POST ããã @/path/to/file ã®ããã« value ã®å é ã @ ã§ã¯ãã¾ã£ã¦ããã¨ãã¡ã¤ã«ãèªã¿è¾¼ãã§æ¹è¡æåãåãé¤ãããã©ã¡ã¼ã¿ã @ ã¤ãã§æå®ãããã¡ã¤ã«ã®ä¸èº«ã¯ãã¹ã¦ URL ã¨ã³ã³ã¼ãããã¦ãããã¨ãæå¾ ããããã¤ã¾ã curl(1) 㯠URL ã¨ã³ã³ã¼ããã¦ãããªãã -d ãè¤æ°åæå®ããã¨ãã¹ã¦ã®ãã©ã¡ã¼ã¿ã & ã§é£çµãããã @ ã§ãã¡ã¤ã«ãæå®ããå ´åã -d '[email protected]' ã®ããã«ããã¨ä¸èº«ãå±éãããªãã®ã§æ³¨æ ([email protected] ã¨ããæååã渡ããã) $ curl -d '
404 error ãæ¢ãã®ãã¼ã¸ã¯ç§»åãããã¯åé¤ãããå¯è½æ§ããããã¾ãã The page has might be moved or deleted.
ãã®è¨äºã¯æ¤è¨¼å¯è½ãªåèæç®ãåºå ¸ãå ¨ã示ããã¦ããªãããä¸ååã§ãã åºå ¸ã追å ãã¦è¨äºã®ä¿¡é ¼æ§åä¸ã«ãååãã ãããï¼ãã®ãã³ãã¬ã¼ãã®ä½¿ãæ¹ï¼ åºå ¸æ¤ç´¢?: "UNIXæé" â ãã¥ã¼ã¹Â · æ¸ç±Â · ã¹ã«ã©ã¼Â · CiNii · J-STAGE · NDL · dlib.jp · ã¸ã£ãã³ãµã¼ã · TWL (2020å¹´1æ) UNIXæé 1,000,000,000 ã¾ã§ãã¨ãããã®2001å¹´9æ9æ¥ UNIXæéï¼ã¦ããã¯ã¹ãããï¼ã¾ãã¯UNIXæå»ï¼ã¦ããã¯ã¹ããããUNIX timeï¼ã¦ããã¯ã¹ã¿ã¤ã ï¼ãPOSIX timeï¼ãã¸ãã¯ã¹ã¿ã¤ã ï¼ï¼ã¨ã¯ã³ã³ãã¥ã¼ã¿ã¼ã·ã¹ãã ä¸ã§ã®æå»è¡¨ç¾ã®ä¸ç¨®ãåå®ä¸çæ (UTC) ã§ã®1970å¹´1æ1æ¥åå0æ0å0ç§ï¼UNIXã¨ããã¯ï¼ããå½¢å¼çãªçµéç§æ°ã¨ãã¦è¡¨ãããã çã®çµéç§æ°ã§ã¯ãªã[1]ããã®éã«æ¿å ¥ãããéç§ãå¼ããåé¤
Linuxã¯1ãã£ã¬ã¯ããªã«å¤§ä½ãã¡ã¤ã«æ°ã 1ä¸ãã¡ã¤ã«ä½ï¼ã¾ã大ä½5000ãã¡ã¤ã«ã§ãããã»ããç¡é£ããªï¼ï¼ æºãè¾¼ããã¨èããã®ã§ãã 1ãã£ã¬ã¯ããªå ã®ãã£ã¬ã¯ããªæ°ã®å¶éã¯ããã®ã§ããããï¼ ä»ã1ãã£ã¬ã¯ããªå ã«å¤§ä½800ãã£ã¬ã¯ããªä½æããã㨠æã£ã¦ããã®ã§ããã大ä¸å¤«ã§ããããï¼
exprã§ã¯ï¼æ´æ°ã®ååæ¼ç®ãæ°å¤å¤å¥ã¨ãã£ãç°¡åãªå¦çããè¡ããªããå°æ°ç¹ãå©ç¨ãããªã©ããè¤éãªå¦çãè¡ãããå ´åã¯ï¼bcãå©ç¨ãããbcã¯exprã¨ã¯éãï¼ãã¡ã¤ã«ããã¤ããªã©ã§å¼ã渡ãããå¤ãå¦çããã ãã¨ãã°ï¼ã1+1ãã¨ããè¨ç®ãè¡ãå ´åã¯ï¼
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}