°Ô½Ã¹° 42°Ç
   
[Scripts] ƯÁ¤ ±â°£ ÆÄÀÏ Ã£¾Æ¼­ ¹é¾÷Çϱâ
±Û¾´ÀÌ : ÃÖÀå¼· ³¯Â¥ : 2015-06-11 (¸ñ) 14:16 Á¶È¸ : 3594
#!/bin/csh
# to remove files more than 30 days from directory /delete_tmp_dir
#find /delete_tmp_dir -mtime +30 -print -exec rm -f {} \;
#find /delete_tmp_dir -type d -print -exec rmdir {} \;

# /delete_tmp_dir¿¡¼­ 10ÀÏ ÀÌ»óµÈ ÆÄÀÏÀ» »èÁ¦
find /delete_tmp_dir -mtime +10 -print -exec rm -f {} \;
# /delete_tmp_dir¿¡¼­ 31ÀÏ ÀÌ»óµÈ ÆÄÀÏÀ» »èÁ¦
find /delete_tmp_dir -mtime +31 -print -exec rm -f {} \;

# /delete_tmp_dir/old_dir¿¡ ÀÖ´Â ³»¿ëÁß 0ÀÏ µÈ µ¥ÀÌŸ¸¦ /delete_tmp_dir/new_dir¿¡ move
find /delete_tmp_dir/old_dir -mtime +0 -print -exec mv {} /delete_tmp_dir/new_dir \;

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

miwit.com sir.co.kr DNS Powered by DNSEver.com DNS Powered by DNSEver.com