ã¡ã¨ä½æ¥ããã¦ãã¦å°ãç ®è©°ã¾ã£ã¦ããã®ã§ãæ°å転æã«ã(ãã¯ã¯
ã¡ãã£ã¨åã«ãä½æ¥ã®éç¨ããã°ã«åãã¾ãããããªãã¦ãããã¯ãèªãã äºãããã¾ããã
- ã³ã¢ãã¯ã®è·¯å°: ä½æ¥ãã°ã®åãæ¹
http://blog.miraclelinux.com/ctd/2006/08/post_a6c8.html - å
å®ããç 究室çæ´»ã®ããã® 100 ã®ãã³ã
http://www.ispl.jp/~oosaki/research/100-tips-lab/
確ãã«ãªã ã¨æã£ãã®ã§ãããä¸ã®åä½ç°å¢ã£ã¦ãLinuxãªä¸çãæ³å®ãã¦ãããã§ãããã
ãããããWindowsãªä¸ç㯠ã©ã¼ãããããã®ï¼ãã¨æã£ã訳ã§ãã
ã³ãã³ãããã³ããã®ãããã¡ãµã¤ãºãç¡è¶è¦è¶å¤ãããã£ã¦åæãèãããããã§ãããã¹ãã¼ããããªãã§ããããã
ãã®éãã ãããã£ãè¦ä»¶ãæãåºãã¦ã¯ããã¼ããæ§ã«æ¤ç´¢ãã¼ã¯ã¼ããã¨ã£ããã²ã£ãããã¤ã¤ãã伺ããç«ã¦ã¦ãã訳ã§ãã
ã§ãã¾ããããç¨åº¦ Windowsã§ãä½æ¥ãã°ãåãæ¹æ³ã«ã¤ãã¦ãè¦è¾¼ã¿ãç«ã£ã¦ããã®ã§ãç´¹ä»ãã°ã
1.DOS process LOG writer(doslog)ã使ã
PHOENIXãããä½ãããã¢ããªã±ã¼ã·ã§ã³ã§ãã
- DOS process LOG writer(Windows95/98/Me / ã¦ã¼ãã£ãªãã£)
http://www.vector.co.jp/soft/dl/win95/util/se144974.html
使ãæ¹ä¾ãã以ä¸ã«ç¤ºãã¾ãã
$ set LOG_FILE=/OUT log.txt $ doslog cmd å®è¡ãã¦ãã¾ã... > cmd Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. $ dir /w ãã©ã¤ã F ã®ããªã¥ã¼ã ã©ãã«ã¯ ããªã¥ã¼ã ã§ã ããªã¥ã¼ã ã·ãªã¢ã«çªå·ã¯ C8D2-1C4A ã§ã xxx ã®ãã£ã¬ã¯ã㪠[.] [..] Doslog.exe doslog.txt log.txt 3 åã®ãã¡ã¤ã« 65,398 ãã¤ã 2 åã®ãã£ã¬ã¯ã㪠50,034,937,856 ãã¤ãã®ç©ºãé å $ exit æè¦æé = 14 ç§ 031 çµäºã³ã¼ãï¼0 log.txt ã«åããã»ã¹ãåãåºããåºåãä¿åããã¦ãã¾ã
ã¡ãªã¿ã«ãlog.txtã¯ããããªé¢¨ã«ãªã£ã¦ãã¾ãã
Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. $ ãã©ã¤ã F ã®ããªã¥ã¼ã ã©ãã«ã¯ ããªã¥ã¼ã ã§ã ããªã¥ã¼ã ã·ãªã¢ã«çªå·ã¯ C8D2-1C4A ã§ã xxx ã®ãã£ã¬ã¯ã㪠[.] [..] Doslog.exe doslog.txt log.txt 3 åã®ãã¡ã¤ã« 65,398 ãã¤ã 2 åã®ãã£ã¬ã¯ã㪠50,034,937,856 ãã¤ãã®ç©ºãé å $
2.Tee.vbsã使ã
å岡ããã¨ããæ¹ã®ä½ããããTee.vbsã使ãã¾ããVBScriptã§ä½ããã¦ãã¾ãã
- Tee.VBS(Windows95/98/Me / ã¦ã¼ãã£ãªãã£)
http://www.vector.co.jp/soft/win95/util/se319986.html?g
使ãæ¹ãã以ä¸ã«ç¤ºãã¾ãã
$ cmd 2>&1 | cscript tee.vbs log.txt Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. $ dir ãã©ã¤ã F ã®ããªã¥ã¼ã ã©ãã«ã¯ ããªã¥ã¼ã ã§ã ããªã¥ã¼ã ã·ãªã¢ã«çªå·ã¯ C8D2-1C4A ã§ã xxx ã®ãã£ã¬ã¯ã㪠2006/11/12 22:26 <DIR> . 2006/11/12 22:26 <DIR> .. 2006/11/12 22:26 0 log.txt 2006/10/22 01:01 2,577 Tee.TXT 2006/11/12 12:43 1,132 Tee.VBS 3 åã®ãã¡ã¤ã« 3,709 ãã¤ã 2 åã®ãã£ã¬ã¯ã㪠50,034,937,856 ãã¤ãã®ç©ºãé å $ exit
ã¡ãªã¿ã«ãlog.txtã¯ããããªé¢¨ã«ãªã£ã¦ãã¾ãã
Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. $ ãã©ã¤ã F ã®ããªã¥ã¼ã ã©ãã«ã¯ ããªã¥ã¼ã ã§ã ããªã¥ã¼ã ã·ãªã¢ã«çªå·ã¯ C8D2-1C4A ã§ã xxx ã®ãã£ã¬ã¯ã㪠2006/11/12 22:26 <DIR> . 2006/11/12 22:26 <DIR> .. 2006/11/12 22:26 0 log.txt 2006/10/22 01:01 2,577 Tee.TXT 2006/11/12 12:43 1,132 Tee.VBS 3 åã®ãã¡ã¤ã« 3,709 ãã¤ã 2 åã®ãã£ã¬ã¯ã㪠50,034,937,856 ãã¤ãã®ç©ºãé å $
3.Cygwinçã®scriptã³ãã³ãã使ã
ä¸ã®2ã¤ã¯ãæ¨æºåºåã¨æ¨æºã¨ã©ã¼åºåãããã¡ã¤ã«ã«ä¿åãã¦ããã¾ãã
ããããæ¨æºå
¥åã¨ãããããã¼ãã¼ãããå
¥åããå
容ã¾ã§ã¯ä¿åãã¦ããã¾ããã
ã¨ãã訳ã§ãCygwinçã®scriptã³ãã³ãã§ãã
ã¡ãªã¿ã«ãé©å½ã«çªã£è¾¼ãã ã®ã§ãã©ã®ããã±ã¼ã¸ã«å«ã¾ãã¦ããã®ãç¥ãã¾ãããããããªãã¨æã£ã¦ããã³ãã³çªã£è¾¼ãã ã ãã£ããã¨ããç¶æ³ã§ãã
使ãæ¹ãã以ä¸ã«ç¤ºãã¾ãã
bash-3.1$ script log.txt ã¹ã¯ãªãããéå§ãã¾ããããã¡ã¤ã«ã¯ log.txt ã§ã sh-3.1$ dir FePy.url IPCE Public\ SVN\ repository.url TODO log.txt trunk website sh-3.1$ exit exit ã¹ã¯ãªãããçµäºãã¾ããããã¡ã¤ã«ã¯ log.txt ã§ã
ã¡ãªã¿ã«ãlog.txtã¯ããããªé¢¨ã«ãªã£ã¦ãã¾ãã
ã¹ã¯ãªãã㯠Sun Nov 12 22:33:50 2006 ã«éå§ãã¾ããsh-3.1$ dir FePy.url IPCE Public\ SVN\ repository.url TODO log.txt trunk website sh-3.1$ exit exit ã¹ã¯ãªãã㯠Sun Nov 12 22:34:02 2006 ã«çµäºãã¾ãã
Cygwinçã®scriptã¯å®è¡ããã¨ãã·ã§ã«ãCygwinã®shã«ãªã£ã¡ããããã§ãã
ã¾ããä½æ¥ãã°ã«æ®ããã ãããå°ã
ã®äºã¯ç®ãã¤ã¶ãã¾ãããã
ã¾ã¨ã
å
¥åå
容ãä¿åãã¦ãããã¨ããç¹ã§ã¯ãCygwinçã®scriptã³ãã³ãããªï¼ã¨ããæ°ããã¾ãã
ãã ãæ軽ã«ä½¿ãããåãã«ã¯ãdoslogãtee.vbsã ã奨ãã§ããããã
ä»ã«ä½æ¥ãã°ãæ®ãæ¹æ³ãããããããªãããªï¼ã¨æã£ã¦ãããã§ãããã¡ãã£ã¨æãã¤ãã¾ããã
ã©ãªããããåç¥ã®æ¹ãå±
ããã¾ããã§ããããã