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/
--> ¾Æ¹«·± ¸®½ºÆ®°¡ Ãâ·ÂµÇÁö ¾Ê´Â´Ù.
# 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.