°Ô½Ã¹° 1,369°Ç
   
run-parts
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2017-05-17 (¼ö) 14:57 Á¶È¸ : 9983
±ÛÁÖ¼Ò :
                                
run-parts - run scripts or programs in a directory
 :: ƯÁ¤µð·ºÅ丮³»¿¡ ½ºÅ©¸³Æ®³ª ÇÁ·Î±×·¥À» ½ÇÇà½ÃÅ°´Â ¸í·É¾î·Î »çÀü½Ä(directory)....Áï ¾ËÆĺª ¼ø¼­´ë·Î Á¤·Ä½ÃÄѼ­ ½ÇÇàÇϰԵȴÙ.


OS : Ubuntu 16.04 LTS 
# cat /etc/crontab
# m h dom mon dow user command
55 * * * * root    cd / && run-parts --report /etc/cron.hourly


¡Ø ÁÖÀÇ»çÇ× 
# man run-parts
If  neither  the  --lsbsysinit  option  nor  the --regex option is given then the names must consist entirely of ASCII upper- and lower-case letters, ASCII digits, ASCII underscores, and ASCII minus-hyphens.
"¹ø¿ªÇÏÀÚ¸é....  ascii ÄÚµå·Î µÈ ´ë/¼Ò¹®ÀÚ, ¼ýÀÚ, ¹ØÁÙ, ÇÏÀÌǸ¸ ½ÇÇེũ¸³Æ® À̸§À¸·Î »ç¿ëÇÒ¼ö ÀÖ´Ù"


# ls
drop_cache.sh
# run-parts --list /etc/cron.hourly/
 --> ¾Æ¹«·± ¸®½ºÆ®°¡ Ãâ·ÂµÇÁö ¾Ê´Â´Ù.

# ls
drop_cache
# run-parts --list /etc/cron.hourly/
/etc/cron.hourly//drop_cache


CentOS ¿¡¼­´Â .sh ÆÄÀϵµ Ãâ·ÂÀ̵ȴÙ.
OS : CentOS 7.X
# run-parts --list /etc/cron.hourly/
/etc/cron.hourly/0anacron
/etc/cron.hourly/drop_cache.sh

# run-parts
Usage: run-parts [--list | --test] <dir>


OS : Ubuntu 16.04
# run-parts --help
Usage: run-parts [OPTION]... DIRECTORY
      --test          print script names which would run, but don't run them.
      --list          print names of all valid files (can not be used with
                      --test)
  -v, --verbose       print script names before running them.
      --report        print script names if they produce output.
      --reverse       reverse execution order of scripts.
      --exit-on-error exit as soon as a script returns with a non-zero exit
                      code.
      --lsbsysinit    validate filenames based on LSB sysinit specs.
      --new-session   run each script in a separate process session
      --regex=PATTERN validate filenames based on POSIX ERE pattern PATTERN.
  -u, --umask=UMASK   sets umask to UMASK (octal), default is 022.
  -a, --arg=ARGUMENT  pass ARGUMENT to scripts, use once for each argument.
  -V, --version       output version information and exit.
  -h, --help          display this help and exit.


À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.