{"id":749,"date":"2014-12-21T02:41:41","date_gmt":"2014-12-21T02:41:41","guid":{"rendered":"http:\/\/blog.moramcnt.com\/?p=749"},"modified":"2015-01-04T05:04:02","modified_gmt":"2015-01-04T05:04:02","slug":"%ec%98%a4%eb%9d%bc%ed%81%b4-%ec%95%84%ec%b9%b4%ec%9d%b4%eb%b8%8c-%eb%a1%9c%ea%b7%b8-%eb%b0%b1%ec%97%85-%eb%b0%8f-%ec%9d%b4%eb%8f%99-%ec%89%98-%ec%8a%a4%ed%81%ac%eb%a6%bd%ed%8a%b8","status":"publish","type":"post","link":"http:\/\/blog.moramcnt.com\/?p=749","title":{"rendered":"\uc624\ub77c\ud074 \uc544\uce74\uc774\ube0c \ub85c\uadf8 \ubc31\uc5c5 \ubc0f \uc774\ub3d9 \uc258 \uc2a4\ud06c\ub9bd\ud2b8"},"content":{"rendered":"<p>\uc624\ub77c\ud074 \uc544\uce74\uc774\ube0c\ub85c\uadf8 \ubc31\uc5c5 \ubc0f \uc774\ub3d9<br \/>\n&#8211; find \uba85\ub839\uc5d0 -mtime\uc740 \uc77c\ub2f9\uc778\ub370 -mmin \uac19\uc740 \uc635\uc158\uc774 \uc5c6\uc5b4 touch\ub85c \ud30c\uc77c\uc0dd\uc131\ud6c4<br \/>\n  \uadf8 \ud30c\uc77c\uc758 \uc0dd\uc131\uc77c\uacfc \ube44\uad50\ud558\uc5ec 1\uc2dc\uac04 \uc804 \ub370\uc774\ud130\ub97c \uac80\uc0c9 \ud560\uc218 \uc788\ub2e4.<\/p>\n<pre>\r\n#! \/bin\/ksh\r\n\r\nORACLE_ARCHIVE_SRC_DIR=\"\/rtd_data10\/ARCH\"\r\nORACLE_ARCHIVE_DST_DIR=\"\/backup\/rtd\/rtd_data10\/ARCH\"\r\nORACLE_ARCHIVE_PREFIX_NAME=\"archive\"\r\n\r\n#------------------------------------------------------\r\n# \uc624\ub798\ub41c \uc555\ucd9c\ud30c\uc77c \uc0ad\uc81c \uc8fc\uae30(\uc77c\ub2e8\uc704)\r\n#------------------------------------------------------\r\nDEL_GZIP_FILE_INTERVAL=\"60\"\r\n\r\n#------------------------------------------------------\r\n# KST-9\ub294 \uc2dc\uac04 -8\uc740 1\uc2dc\uac04\uc804\r\n#------------------------------------------------------\r\nFIND_TIME=`TZ=KST-8; date +%Y%m%d%H%M`\r\n\r\nTEMP_DIR=$ORACLE_ARCHIVE_SRC_DIR\/$FIND_TIME\r\n\r\n#------------------------------------------------------\r\n# \uc784\uc2dc\ud3f4\ub354 \uc0dd\uc131\r\n#------------------------------------------------------\r\nmkdir -p $TEMP_DIR\r\n\r\n#------------------------------------------------------\r\n# \uc784\uc2dc\ud3f4\ub354\uc5d0 \uc0dd\uc131\uc77c\uc774 1\uc2dc\uac04\uc804\uc778 \ud30c\uc77c \uc0dd\uc131\r\n#------------------------------------------------------\r\ntouch -t $FIND_TIME  $TEMP_DIR\/$FIND_TIME\r\n\r\n#------------------------------------------------------\r\n# \ud15c\ud504\ud3f4\ub354\ub85c \uc774\ub3d9\r\n#------------------------------------------------------\r\nfind $ORACLE_ARCHIVE_SRC_DIR -name \"$ORACLE_ARCHIVE_PREFIX_NAME*\" ! -newer $TEMP_DIR\/$FIND_TIME -exec mv {} $TEMP_DIR \\;\r\n\r\n#------------------------------------------------------\r\n# \uc2e4\uc81c \ub85c\uadf8\uc800\uc7a5\uc18c\ub85c \uc555\ucd95\r\n#------------------------------------------------------\r\ntar cf - $TEMP_DIR | gzip > $ORACLE_ARCHIVE_DST_DIR\/$FIND_TIME.tar.gz\r\n\r\n#------------------------------------------------------\r\n# \ud15c\ud504\ud3f4\ub354 \uc0ad\uc81c\r\n#------------------------------------------------------\r\nfind $TEMP_DIR -exec rm -rf {} \\;\r\n\r\n#------------------------------------------------------\r\n# \uae30\uc874 \uc555\ucd9c\ud30c\uc77c \uc0ad\uc81c, \ud604\uc7ac 30\uc77c\uc804 \uc555\ucd95\ud30c\uc77c\uc744 \ubaa8\ub450 \uc0ad\uc81c\ud55c\ub2e4\r\n#------------------------------------------------------\r\nfind $ORACLE_ARCHIVE_DST_DIR -name \"*.tar.gz\" -mtime +$DEL_GZIP_FILE_INTERVAL -exec rm -f {} \\;\r\nexit\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\uc624\ub77c\ud074 \uc544\uce74\uc774\ube0c\ub85c\uadf8 \ubc31\uc5c5 \ubc0f \uc774\ub3d9 &#8211; find \uba85\ub839\uc5d0 -mtime\uc740 \uc77c\ub2f9\uc778\ub370 -mmin \uac19\uc740 \uc635\uc158\uc774 \uc5c6\uc5b4 touch\ub85c \ud30c\uc77c\uc0dd\uc131\ud6c4 \uadf8 \ud30c\uc77c\uc758 \uc0dd\uc131\uc77c\uacfc \ube44\uad50\ud558\uc5ec 1\uc2dc\uac04 \uc804 \ub370\uc774\ud130\ub97c \uac80\uc0c9 \ud560\uc218 \uc788\ub2e4. #! \/bin\/ksh ORACLE_ARCHIVE_SRC_DIR=&#8221;\/rtd_data10\/ARCH&#8221; ORACLE_ARCHIVE_DST_DIR=&#8221;\/backup\/rtd\/rtd_data10\/ARCH&#8221; ORACLE_ARCHIVE_PREFIX_NAME=&#8221;archive&#8221; #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; # \uc624\ub798\ub41c \uc555\ucd9c\ud30c\uc77c \uc0ad\uc81c \uc8fc\uae30(\uc77c\ub2e8\uc704) #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; DEL_GZIP_FILE_INTERVAL=&#8221;60&#8243; #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; # KST-9\ub294 \uc2dc\uac04 -8\uc740 1\uc2dc\uac04\uc804 #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; FIND_TIME=`TZ=KST-8; date +%Y%m%d%H%M` TEMP_DIR=$ORACLE_ARCHIVE_SRC_DIR\/$FIND_TIME #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; # \uc784\uc2dc\ud3f4\ub354 \uc0dd\uc131 #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[31,49],"tags":[79,78,52,50,53,85,51,54,86],"class_list":["post-749","post","type-post","status-publish","format-standard","hentry","category-31","category-unix","tag-moramcnt","tag-78","tag-52","tag-50","tag-53","tag-85","tag-51","tag-54","tag-86"],"_links":{"self":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts\/749","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=749"}],"version-history":[{"count":1,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts\/749\/revisions"}],"predecessor-version":[{"id":750,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts\/749\/revisions\/750"}],"wp:attachment":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=749"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}