´ÙÀ½ ÀÌÀü Â÷·Ê

2. °£´ÜÇÑ ÆÁµé

2.1 Handy Syslog Trick Paul Anderson, Tips-HOWTO maintainer.

´ç½ÅÀÇ /etc/syslog.conf¸¦ ¼öÁ¤ÇÏ°í ´ÙÀ½ÀÇ ¶óÀÎÀ» Ãß°¡Çضó:

         # Dump everything on tty8
         *.*                                     /dev/tty8
  
°æ°í : TABÀ» »ç¿ëÇØ¾ß ÇÑ´Ù´Â °ÍÀ» ±â¾ïÇضó. syslog´Â space¸¦ ½È ¾îÇÑ´Ù...

2.2 Handy Script to Clean Up Corefiles.

ohammers@cu-online.com Handy Script to Clean Up Corefiles. ´ÙÀ½°ú °°ÀÌ rmcores¶ó ºÒ¸®´Â fileÀ» ¸¸µé¾î¶ó.(ÇÊÀÚ´Â ±×°ÍÀ» handle-cores¶ó ºÎ¸¥´Ù) :


         #!/bin/sh
         USAGE="$0 <directory> <message-file>"
         if [ $# != 2 ] ; then
                 echo $USAGE
                 exit
         fi
          echo Deleting...
         find $1 -name core -atime 7 -print -exec rm {} \;
         echo e-mailing
         for name in  `find $1 -name  core -exec  ls -l {}  \; | cut 
  -c16-24`
         do
                 echo $name
                 cat $2 | mail $name
         done

±×¸®°í cron jobÀÌ ±×°ÍÀ» Á¾Á¾ ½ÇÇàÇϵµ·Ï Çضó.

2.3 Moving directories between filesystems.

Alan Cox, A.Cox@swansea.ac.uk file Æ®¸® Àüü¸¦ ÇÑ µð½ºÅ©·ÎºÎÅÍ ´Ù¸¥ µð½ºÅ©·Î ºü¸£°Ô ¿Å±â´Â ¹æ¹ý

  
        (cd /source/directory &&  tar cf  - . )  | (cd  /dest/directory 
  && tar xvfp -)
ºÒÇàÀÌ ÀÖÀ» °æ¿ì µð·ºÅ丮°¡ ¹¶°ÔÁö´Â °ÍÀ» ¹æÁöÇϱâ À§Çؼ­ cd /source/directory; tar...etcºÎÅÍ º¯°æÇضó. ³ª¿¡°Ô ¾Ë·ÁÁØ°Í¿¡ ´ëÇØ Jim Dennis¿¡°Ô, jadestar@rahul.net, °¨»çÇÑ´Ù.

2.4 ¾î¶² µð·ºÅ丮°¡ °¡Àå Å«Áö ¾Ë¾Æ³»±â.

mghazey@miso.lowdown.com ´ç½ÅÀÇ ÄÄÇ»ÅÍ¿¡¼­ °¡Àå Å« µð·ºÅ丮´Â ¹«¾ùÀÎÁö ±Ã±ÝÇØ ÇÑÀûÀº ¾ø´Â °¡? ¿©±â ¾Ë¾Æ³¾ ¼ö ÀÖ´Â ¹æ¹ýÀÌ ÀÖ´Ù.

         du -S | sort -n
  

2.5 The Linux Gazette

¿µ¿¹´Â Linux GazetteÀÇ Ã¢½ÃÀÚÀÎ John Fisk¿¡°Ô µ¹¾Æ°£´Ù. ±×°ÍÀº ³î ¶ó¿î e-zine plusÀ̸ç, ±×°ÍÀº ¹«·áÀÌ´Ù!! ´õ ÀÌ»ó ¹«¾ùÀ» ¹°¾îº¼°ÍÀÎ °¡. ÀÌ°÷¿¡¼­ È®ÀÎÇ϶ó. www.redhat.com/lg ±×°÷¿¡ Àִµ¿¾È John Fisk¿¡°Ô e-zine LG°¡ ¾ó¸¶³ª ³î¶ó¿î °Í ÀÎÁö ¸¦ ¸»ÇØÁÖ´Â ³ëÆ®¸¦ ³²°Ü¶ó.

2.6 Pointer to patch for GNU Make 3.70 to change VPATH behavor.

Ted Stern, stern@amath.washington.edu Pointer to patch for GNU Make 3.70 to change VPATH behavor. ¸¹Àº »ç¶÷µéÀÌ ÀÌ·¯ÇÑ ¹®Á¦Á¡À» Áö´Ï°í ÀÖ´ÂÁö´Â ¾Ë¼ö¾øÁö¸¸, ³»°¡ ÁÁ ¾ÆÇÏÁö ¾Ê´Â 3.70 ¹öÀüÀÇ GNU makeÀÇ Æ¯Â¡ÀÌ ÀÖ´Ù. ±×°ÍÀº Àý´ë °æ ·Î¸¦ ÁÙ °æ¿ì VPATH°¡ Àç¹ÌÀÖ´Â ÇൿÀ» ÇÑ´Ù´Â °ÍÀÌ´Ù. ÀÌ°ÍÀ» ¼öÁ¤ ÇÏ´Â Àý´ëÀûÀ¸·Î ¹ÏÀ»¸¸ÇÑ ÆÐÄ¡°¡ Àִµ¥, Paul Smith< psmith@wellfleet.com>À¸·ÎºÎÅÍ ±×°ÍÀ» ±¸ÇÒ ¼ö ÀÖ´Ù. ¶Ç ±×´Â ¾ÕÀ¸·ÎÀÇ ¸ðµç »õ·Î¿î ¹öÀüÀÇ makeÀÇ ¹®¼­¿Í ÆÐÄ¡¸¦ ´º½º±×·ì |gnu.utils.bug|¿¡ ¿Ã·Á³õÀ» °ÍÀÌ´Ù. ÀϹÝÀûÀ¸·Î, ³ª´Â ³»°¡ ¾ï¼¼½ºÇÏ´Â ¸ðµç ½Ã½ºÅÛ¿¡ ÀÌ ÆÐÄ¡¸¦ Àû¿ëÇÏ°í gmake¸¦ ´Ù½Ã Ä¿ÆÄÀÏÇÑ´Ù.

2.7 ¾î¶»°Ô ¸Å ºÎÆýø¶´Ù fsckingÀ» ÇÏ´Â °ÍÀ» ¸·À»°ÍÀΰ¡.

Dale Lutz, dal@wimsey.com Q: ¸Å¹ø ºÎÆÃÇÒ¶§¸¶´Ù e2fsck°¡ µð½ºÅ© üũ¸¦ ÇÏ´Â °ÍÀ» ¾î¶»°Ô ¸· ³ª? A: Ä¿³ÎÀ» ´Ù½Ã¸¸µé ¶§, filesystemÀº 'dirty'ÇÏ°Ô ±â·ÏµÇ°í ±×·¡¼­ ´ç ½ÅÀÇ µð½ºÅ©´Â ¸Å ºÎÆø¶´Ù üũµÉ °ÍÀÌ´Ù. ÀÌ°ÍÀ» ¼öÁ¤ÇÏ·Á¸é ´ÙÀ½À» ½ÇÇàÇضó: rdev -R /zImage 1 ÀÌ°ÍÀº ´õ ÀÌ»ó filesystemÀÌ 'dirty'ÇÏ´Ù°í ³³µæÇÏÁö ¾Êµµ·Ï Ä¿³ÎÀ» ¼ö Á¤ÇØÁØ´Ù. ¾Ë¾ÆµÎ±â : lilo¸¦ »ç¿ëÇÑ´Ù¸é lilo config file ³»ÀÇ ¸®´ª½º ¼Â¾÷¿¡ read-only¸¦ Ãß°¡Çضó. (ÈçÈ÷ /etc/lilo.conf)

2.8 ºÎÆ®½Ã¿¡ "device busy"¿¡ ÀÇÇØ ¾ß±âµÇ´Â fscks ÇÇÇϱâ.

Jon Tombs, jon@gtex02.us.es ¸®ºÎÆÃÇÒ ¶§ filesystemÀÌ fscks¸¦ ÇÊ¿ä·Î ÇÏ°Ô ¸¸µå´Â ¼Ë´Ù¿î½ÃÀÇ device busy ¿¡·¯¸¦ Á¾Á¾ ¸¸³­´Ù¸é, ¿©±â °£´ÜÇÑ ÇØ°áÃ¥ÀÌ ÀÖ´Ù: /etc/rc.d/init.d/halt ȤÀº /etc/rc.d/rc.0¿¡ ´ÙÀ½ÀÇ ¶óÀÎÀ» Ãß°¡ÇÑ´Ù. mount -o remount,ro /mount.dir ·çÆ® '/'¸¦ Á¦¿ÜÇÑ ¸ðµç ¸¶¿îÆ® µÈ filesystem¿¡ À־ umount -a¸¦ È£ÃâÇϱâ Àü¿¡ ÀÌ·¯ÇÑ Ã³¸®¸¦ ÇØÁØ´Ù. ÀÌ°ÍÀº ¸î°¡Áö ÀÌÀ¯¿¡ À־ shutdownÀÌ ¸ðµç ÇÁ·Î¼¼½º¸¦ Á×ÀÌ°í µð½ºÅ©¸¦ umount Çϴµ¥ ½ÇÆÐÇÏ ´õ¶óµµ rebootÇÒ ¶§ ¿©ÀüÈ÷ 'clean'ÇÒ °ÍÀ» ÀǹÌÇÑ´Ù. ³ªÀÇ °æ¿ì¿¡´Â rebootÇÒ ¶§ »ó´çÇÑ ½Ã°£À» Àý¾àÇØÁØ´Ù.

2.9 Çϵåµð½ºÅ© »ó¿¡¼­ °¡Àå Å« ÆÄÀÏ ¾Ë¾Æ³»±â

Simon Amor, simon@foobar.co.uk

        ls -l | sort +4n
¶Ç´Â Çϵåµð½ºÅ©°¡ °ø°£»óÀÇ ¹®Á¦°¡ ÀÖ´Ù¸é ÀÌ°ÍÀº ½Ã°£Àº °É¸®Áö¸¸ Àß ÈǸ¢È÷ µ¿ÀÛÇÒ °ÍÀÌ´Ù.
        cd /
     ls -lR | sort +4n

2.10 How to print pages with a margin for hole punching.

Mike Dickey, mdickey@thorplus.lib.perdue.edu


            #!/bin/sh
            # /usr/local/bin/print
            # a simple formatted printout, to enable someone to
            # 3-hole punch the output and put it in a binder
            cat $1 | pr -t -o 5 -w 85 | lpr
  

2.11 file Æ®¸®¸¦ ÅëÇÏ¿© ƯÁ¤ÇÑ ÀÏ»ó Ç¥Çö ã¾Æ³»±â.

Raul Deluth Miller, rockwell@nova.umd.edu file Æ®¸®¸¦ ÅëÇÏ¿© ƯÁ¤ÇÑ ÀÏ»ó Ç¥Çö ã¾Æ³»±â ³ª´Â ÀÌ°ÍÀ» 'forall' ½ºÅ©¸³Æ®¶ó°í ºÎ¸¥´Ù. ÀÌ·¸°Ô »ç¿ëÇضó:

        forall /usr/include grep -i ioctl
         forall /usr/man grep ioctl
¿©±â forallÀÌ ÀÖ´Ù:
       
  
         #!/bin/sh
         if [ 1 = `expr 2 \> $#` ]
         then
                 echo Usage: $0 dir cmd [optargs]
                 exit 1
         fi
         dir=$1
         shift
         find $dir -type f -print | xargs "$@"

  

2.12 ÀÚµ¿ ¼¼À̺곪 ¹é¾÷ fileÀ» ¸¸µå´Â ÇÁ·Î±×·¥À» »ç¿ëÇѵÚÀÇ Ã»¼Ò¸¦ À§ÇÑ ½ºÅ©¸³Æ®.

Barry Tolnas, tolnas@nestor.engr.utk.edu ÀÚµ¿ ¼¼À̺곪 ¹é¾÷ fileÀ» ¸¸µå´Â ÇÁ·Î±×·¥. ¿©±â emacsÀÇ ÀÚµ¿-¼¼À̺ê(#)¿Í ¹é¾÷( ) file°ú .o file ±×¸®°í TEX.log fileÀ» »èÁ¦Çϸ鼭 ¹Ýº¹ÀûÀ¸·Î µð·ºÅ丮 °ÔÃþ±¸Á¶¸¦ °¨¼Ò½ÃÅ°´Â °£´ÜÇÑ two-liner°¡ ÀÖ´Ù. ÀÌ°ÍÀº ¶ÇÇÑ .tex¿Í README fileÀ» ¾ÐÃàÇϱ⵵ ÇÑ ´Ù. ³ª´Â ³» ½Ã½ºÅÛÀÇ ÀÌ°ÍÀ» 'sqeeze'¶ó ºÎ¸¥´Ù.


 
         #!/bin/sh
         #SQUEEZE removes unnecessary files  and compresses .tex 
  and README files
         #By Barry tolnas, tolnas@sun1.engr.utk.edu
         #
         echo squeezing $PWD
         find  $PWD \( -name \*~ -or -name \*.o -or -name \*.log 
  -or -name \*\#\) -exec
         rm -f {} \;
         find $PWD \(  -name \*.tex -or  -name \*README\*  -or 
  -name \*readme\* \) -exec gzip -9 {} \;
         
   

2.13 ¾î¶² ÇÁ·Î¼¼½º°¡ ¸Þ¸ð¸®¸¦ °¡Àå ¸¹ÀÌ Àâ¾Æ¸Ô°í ÀÖ´ÂÁö ¾Ë¾Æ³»±â

simon@foobar.co.uk ¾î¶² ÇÁ·Î¼¼½º°¡ ¸Þ¸ð¸®¸¦ °¡Àå ¸¹ÀÌ Àâ¾Æ¸Ô°í ÀÖ´ÂÁö ¾Ë¾Æ³»±â


        ps -aux | sort +4n
    -OR-
         ps -aux | sort +5n

´ÙÀ½ ÀÌÀü Â÷·Ê