{"id":1450,"date":"2005-06-30T03:04:15","date_gmt":"2005-06-30T03:04:15","guid":{"rendered":"http:\/\/dev.jblove.net\/?p=1450"},"modified":"2005-06-30T03:04:15","modified_gmt":"2005-06-30T03:04:15","slug":"cron-%ed%99%9c%ec%9a%a9-table-%eb%b0%b1%ec%97%85-%eb%b0%8f-load-data%eb%a1%9c-%eb%8d%b0%ec%9d%b4%ed%84%b0-insert","status":"publish","type":"post","link":"https:\/\/jblove.net\/?p=1450","title":{"rendered":"CRON \ud65c\uc6a9 table \ubc31\uc5c5 \ubc0f load data\ub85c \ub370\uc774\ud130 insert"},"content":{"rendered":"<p>\uae40\uc601\ud0c1<\/p>\n<p>\uc81c\uac00 \uba70\uce60\ub3d9\uc548 \uace0\uc0dd\ud558\uc5ec \uad6c\ud604\ud55c \ubc29\ubc95\uc785\ub2c8\ub2e4. \ud639\uc2dc\ub77c\ub3c4 \ud544\uc694\ud558\uc2e0 \ubd84 \uc788\uc744\uae4c\ud574\uc11c \uc62c\ub9bd\ub2c8\ub2e4.<\/p>\n<p>vi\uc5d0\uc11c \uc544\ub798\uc640 \uac19\uc774 \uc785\ub825\ud558\uace0 \/etc\/cron.houtly \uc5d0 \uc800\uc7a5\ud574 \ub450\uba74 \ub9e4\uc2dc\uac04\ub9c8\ub2e4 \uc2e4\ud589\ub429\ub2c8\ub2e4.<br \/>\n\ud30c\uc77c \uad8c\ud55c\uc740 755\ub85c \ud574\uc92c\uc2b5\ub2c8\ub2e4.<\/p>\n<p>==================================================================================<br \/>\n#!\/bin\/sh<br \/>\ndat=`date &#8216;+%Y%m%d%H%M&#8217;`<br \/>\n#<br \/>\n# (txt\ub85c \ubcc0\ud658\ub41c \ud30c\uc77c\uc744 ftp\ub85c \uc62c\ub824\ub450\uc5b4 \ud30c\uc77c\uc774 \uc874\uc7ac\ud558\uba74 \uc544\ub798 \uc2a4\ud06c\ub9bd\ud2b8\ub97c \uc2e4\ud589\ud569\ub2c8\ub2e4.)<br \/>\nif [ -f \/home\/zerotak.com\/public_html\/db\/db.txt ] ; then<br \/>\n#<br \/>\n# Table Name Modify(\uc6d0\ub798\uc758 \ud14c\uc774\ube14\uc744 \uc774\ub984\uc744 \ubc14\uafb8\uc5b4 \uadf8\ub300\ub85c \ub461\ub2c8\ub2e4.)<br \/>\n\/usr\/local\/mysql\/bin\/mysql -uid -ppw zerotak -e &#8220;rename table goods to goods_$dat&#8221;<br \/>\n#<br \/>\n# Table Create(\ubbf8\ub9ac \ub9cc\ub4e4\uc5b4\ub454 \ud14c\uc774\ube14 \uc0dd\uc131 \uc2a4\ud06c\ub9bd\ud2b8\ub85c \ud14c\uc774\ube14\uc744 \ub9cc\ub4ed\ub2c8\ub2e4.)<br \/>\n\/usr\/local\/mysql\/bin\/mysql -uid -ppw zerotak < \/home\/zerotak.com\/public_html\/db\/goods.sql<br \/>\n#<br \/>\n# DB Update(\uc0c8\ub85c \ub9cc\ub4e0 \ube48 \ud14c\uc774\ube14\uc5d0 load data \uba85\ub839\uc73c\ub85c txt\ud30c\uc77c\uc758 \ub370\uc774\ud130\ub97c \uc9d1\uc5b4\ub123\uc2b5\ub2c8\ub2e4.)<br \/>\n\/usr\/local\/mysql\/bin\/mysql -uid -ppw zerotak -e &#8220;load data infile &#8216;\/home\/zerotak.com\/public_html\/db\/db.txt&#8217; replace into table goods fields terminated by &#8216;,'&#8221;<br \/>\n#<br \/>\n# File Rename(\uc704 \uacfc\uc815\uc744 \uc2e4\ud589\ud6c4 txt\ud30c\uc77c\uc758 \uc774\ub984\uc744 \ubcc0\uacbd\ud569\ub2c8\ub2e4.)<br \/>\nmv \/home\/zerotak.com\/public_html\/db\/db.txt \/home\/zerotak.com\/public_html\/db\/db_$dat.txt<br \/>\n#<br \/>\n#<br \/>\nfi<br \/>\n================================================================================== <\/p>\n<p> \uc1a1\ud6a8\uc9c4 \uc880 \uc704\ud5d8\ud574 \ubcf4\uc785\ub2c8\ub2e4.<br \/>\ndb.txt \uc758 \ud615\uc2dd\uc774 \uc798\ubabb\ub418\uc5c8\uc744\uacbd\uc6b0 \ubc1c\uacac\ud560\ub54c\uae4c\uc9c0 \uc798\ubabb\ub41c \ub370\uc774\ud130\uac00 \ub4e4\uc5b4\uc788\uaca0\uad70\uc694.<\/p>\n<p>\uc6d0\ubcf8 \ud14c\uc774\ube14\uc758 \uc774\ub984\uc744 \uba3c\uc800 \ubc14\uafb8\uc9c0 \ub9d0\uace0,<br \/>\n\uc0c8 \ud14c\uc774\ube14\uc744 \uc784\uc2dc \uc774\ub984\uc73c\ub85c \uc0dd\uc131\ud558\uc5ec \ub370\uc774\ud130 \uc785\ub825\ud55c \ud6c4,<br \/>\n\uc6d0\ubcf8 \ud14c\uc774\ube14\uc758 \uc774\ub984\uc744 \ubc14\uafb8\uace0, \uc0c8 \ud14c\uc774\ube14\uc758 \uc774\ub984\uc744 \ubc14\uafb8\uba74.<br \/>\n\uc11c\ube44\uc2a4 \uc911\ub2e8\uc2dc\uac04\uc744 \ucd5c\uc18c\ud654 \ud560 \uc218 \uc788\uaca0\uad70\uc694.<\/p>\n<p>\uc784\uc2dc\ud14c\uc774\ube14\uc5d0 \uc785\ub825\ud560 \ub54c \uc624\ub958\uac00 \uc788\uc73c\uba74 \uc791\uc5c5\uc774 \uac70\uae30\uc11c \uc911\ub2e8\ub418\ub3c4\ub85d \ud558\uba74 \uc11c\ube44\uc2a4\uc5d0\ub3c4 \uc9c0\uc7a5 \uc5c6\uaca0\uace0\uc694. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uae40\uc601\ud0c1 \uc81c\uac00 \uba70\uce60\ub3d9\uc548 \uace0\uc0dd\ud558\uc5ec \uad6c\ud604\ud55c \ubc29\ubc95\uc785\ub2c8\ub2e4. \ud639\uc2dc\ub77c\ub3c4 \ud544\uc694\ud558\uc2e0 \ubd84 \uc788\uc744\uae4c\ud574\uc11c \uc62c\ub9bd\ub2c8\ub2e4. vi\uc5d0\uc11c \uc544\ub798\uc640 \uac19\uc774 \uc785\ub825\ud558\uace0 \/etc\/cron.houtly \uc5d0 \uc800\uc7a5\ud574 \ub450\uba74 \ub9e4\uc2dc\uac04\ub9c8\ub2e4 \uc2e4\ud589\ub429\ub2c8\ub2e4. \ud30c\uc77c \uad8c\ud55c\uc740 755\ub85c \ud574\uc92c\uc2b5\ub2c8\ub2e4. ================================================================================== #!\/bin\/sh dat=`date &#8216;+%Y%m%d%H%M&#8217;` # # (txt\ub85c \ubcc0\ud658\ub41c \ud30c\uc77c\uc744 ftp\ub85c \uc62c\ub824\ub450\uc5b4 \ud30c\uc77c\uc774 \uc874\uc7ac\ud558\uba74 \uc544\ub798 \uc2a4\ud06c\ub9bd\ud2b8\ub97c \uc2e4\ud589\ud569\ub2c8\ub2e4.) if [ -f \/home\/zerotak.com\/public_html\/db\/db.txt ] ; then # # Table Name Modify(\uc6d0\ub798\uc758 \ud14c\uc774\ube14\uc744 \uc774\ub984\uc744 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","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":[51],"tags":[],"class_list":["post-1450","post","type-post","status-publish","format-standard","hentry","category-papa-php"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/posts\/1450","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1450"}],"version-history":[{"count":0,"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/posts\/1450\/revisions"}],"wp:attachment":[{"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}