{"id":441,"date":"2015-06-23T10:41:02","date_gmt":"2015-06-23T02:41:02","guid":{"rendered":"http:\/\/www.cnmiss.cn\/?p=441"},"modified":"2015-06-23T10:45:05","modified_gmt":"2015-06-23T02:45:05","slug":"linux%e4%b8%8a%e6%89%a7%e8%a1%8cphp%e8%84%9a%e6%9c%ac%e6%96%87%e4%bb%b6%e6%80%bb%e6%98%af%e6%97%a0%e6%95%85%e4%b8%ad%e6%96%ad%ef%bc%88%e5%a6%82%e4%bd%95%e8%ae%a9%e8%84%9a%e6%9c%ac%e5%90%8e%e5%8f%b0","status":"publish","type":"post","link":"https:\/\/www.cnmiss.cn\/?p=441","title":{"rendered":"linux\u4e0a\u6267\u884cphp\u811a\u672c\u6587\u4ef6\u603b\u662f\u65e0\u6545\u4e2d\u65ad\uff08\u5982\u4f55\u8ba9\u811a\u672c\u540e\u53f0\u6267\u884c\u4e0d\u4e2d\u65ad\uff09"},"content":{"rendered":"<h3>1. \u4f7f\u7528&amp;\u7b26\u53f7\u5728\u540e\u53f0\u6267\u884c\u547d\u4ee4<\/h3>\n<p>\u4f60\u53ef\u4ee5\u5728Linux\u547d\u4ee4\u6216\u8005\u811a\u672c\u540e\u9762\u589e\u52a0&amp;\u7b26\u53f7\uff0c\u4ece\u800c\u4f7f\u547d\u4ee4\u6216\u811a\u672c\u5728\u540e\u53f0\u6267\u884c\uff0c\u4f8b\u5982\uff1a.<\/p>\n<blockquote><p>$ .\/my-shell-script.sh &amp;<\/p><\/blockquote>\n<p>\u8be6\u60c5\u8bf7\u53c2\u8003\u8fd9\u7bc7\u6587\u7ae0 <a href=\"http:\/\/www.thegeekstuff.com\/2010\/05\/unix-background-job\/\" rel=\"nofollow\">Bg, Fg, &amp;, Ctrl-Z \u2013 5 Examples to Manage Unix Background Jobs<\/a><\/p>\n<h3>2. \u4f7f\u7528nohup\u5728\u540e\u53f0\u6267\u884c\u547d\u4ee4<\/h3>\n<p>\u4f7f\u7528&amp;\u7b26\u53f7\u5728\u540e\u53f0\u6267\u884c\u547d\u4ee4\u6216\u811a\u672c\u540e\uff0c\u5982\u679c\u4f60\u9000\u51fa\u767b\u5f55\uff0c\u8fd9\u4e2a\u547d\u4ee4\u5c31\u4f1a\u88ab\u81ea\u52a8\u7ec8\u6b62\u6389\u3002\u8981\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528nohup\u547d\u4ee4\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<blockquote><p>$ nohup .\/my-shell-script.sh &amp;\n<\/p><\/blockquote>\n<p>\u8be6\u60c5\u8bf7\u53c2\u8003\u8fd9\u7bc7\u6587\u7ae0 <a href=\"http:\/\/linux.101hacks.com\/unix\/nohup-command\/\" rel=\"nofollow\">Unix Nohup: Run a Command or Shell-Script Even after You Logout<\/a><\/p>\n<h3>3. \u4f7f\u7528screen\u6267\u884c\u547d\u4ee4<\/h3>\n<p>\u901a\u8fc7nohup\u548c&amp;\u7b26\u53f7\u5728\u540e\u53f0\u6267\u884c\u547d\u4ee4\u540e\uff0c\u5373\u4f7f\u4f60\u9000\u51fa\u767b\u5f55\uff0c\u8fd9\u4e2a\u547d\u4ee4\u4e5f\u4f1a\u4e00\u76f4\u6267\u884c\u3002\u4f46\u662f\uff0c\u4f60\u65e0\u6cd5\u91cd\u65b0\u8fde\u63a5\u5230\u8fd9\u4e2a\u4f1a\u8bdd\uff0c\u8981\u60f3\u91cd\u65b0\u8fde\u63a5\u5230\u8fd9\u4e2a\u4f1a\u8bdd\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528screen\u547d\u4ee4\u3002.<\/p>\n<p>Linux\u7684screen\u547d\u4ee4\u63d0\u4f9b\u4e86\u5206\u79bb\u548c\u91cd\u65b0\u8fde\u63a5\u4e00\u4e2a\u4f1a\u8bdd\u7684\u529f\u80fd\u3002\u5f53\u4f60\u91cd\u65b0\u8fde\u63a5\u8fd9\u4e2a\u4f1a\u8bdd\u7684\u65f6\u5019\uff0c\u4f60\u7684\u7ec8\u7aef\u548c\u4f60\u5206\u79bb\u7684\u65f6\u5019\u4e00\u6a21\u4e00\u6837\u3002<\/p>\n<p>\u8be6\u60c5\u8bf7\u53c2\u8003\u8fd9\u7bc7\u6587\u7ae0 <a href=\"http:\/\/www.thegeekstuff.com\/2010\/07\/screen-command-examples\/\" rel=\"nofollow\">Screen Command Examples: Get Control of Linux \/ Unix Terminal<\/a><\/p>\n<h3>4. \u4f7f\u7528at\u5c06\u4e00\u4e2a\u547d\u4ee4\u4f5c\u4e3a\u6279\u5904\u7406\u6267\u884c<\/h3>\n<p>\u4f7f\u7528at\u547d\u4ee4\uff0c\u4f60\u53ef\u4ee5\u8ba9\u4e00\u4e2a\u547d\u4ee4\u5728\u6307\u5b9a\u7684\u65e5\u671f\u548c\u65f6\u95f4\u8fd0\u884c\uff0c\u4f8b\u5982\u8981\u5728\u660e\u5929\u4e0a\u534810\u70b9\u5728\u540e\u53f0\u6267\u884c\u5907\u4efd\u811a\u672c\uff0c\u6267\u884c\u4e0b\u9762\u7684\u547d\u4ee4\uff1a<\/p>\n<blockquote><p>$ at -f backup.sh 10 am tomorrow\n<\/p><\/blockquote>\n<p>\u8be6\u60c5\u8bf7\u53c2\u8003\u8fd9\u7bc7\u6587\u7ae0 <a href=\"http:\/\/www.thegeekstuff.com\/2010\/06\/at-atq-atrm-batch-command-examples\/\" rel=\"nofollow\">Understand at, atq, atrm, batch Commands using 9 Examples<\/a><\/p>\n<p>\u5728\u6279\u5904\u7406\u6a21\u5f0f\u4e0b\u6267\u884c\u67d0\u4e9b\u4efb\u52a1\u9700\u8981\u542f\u7528\u4e00\u4e9b\u9009\u9879\u3002\u4e0b\u9762\u7684\u6587\u7ae0\u4f1a\u7ed9\u51fa\u8be6\u7ec6\u89e3\u91ca\uff1a.<\/p>\n<ul>\n<li><a href=\"http:\/\/www.thegeekstuff.com\/2009\/10\/how-to-capture-unix-top-command-output-to-a-file-in-readable-format\/\" rel=\"nofollow\">How To Capture Unix Top Command Output to a File in Readable Format<\/a><\/li>\n<li><a href=\"http:\/\/www.thegeekstuff.com\/2009\/11\/unix-bc-command-line-calculator-in-batch-mode\/\" rel=\"nofollow\">Unix bc Command Line Calculator in Batch Mode<\/a><\/li>\n<li><a href=\"http:\/\/www.thegeekstuff.com\/2009\/10\/how-to-execute-ssh-and-scp-in-batch-mode-only-when-passwordless-login-is-enabled\/\" rel=\"nofollow\">How To Execute SSH and SCP in Batch Mode (Only when Passwordless login is enabled)<\/a><\/li>\n<\/ul>\n<h3>5. \u4f7f\u7528watch\u8fde\u7eed\u5730\u6267\u884c\u4e00\u4e2a\u547d\u4ee4<\/h3>\n<p>\u8981\u60f3\u6309\u4e00\u4e2a\u56fa\u5b9a\u7684\u95f4\u9694\u4e0d\u505c\u5730\u6267\u884c\u4e00\u4e2a\u547d\u4ee4\uff0c\u53ef\u4ee5\u4f7f\u7528watch\u547d\u4ee4\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<blockquote><p>$ watch df -h<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>1. \u4f7f\u7528&amp;\u7b26\u53f7\u5728\u540e\u53f0\u6267\u884c\u547d\u4ee4 \u4f60\u53ef\u4ee5\u5728Linux\u547d\u4ee4\u6216\u8005\u811a\u672c\u540e\u9762\u589e\u52a0&#038; &hellip; <a href=\"https:\/\/www.cnmiss.cn\/?p=441\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-441","post","type-post","status-publish","format-standard","hentry","category-xxbj"],"_links":{"self":[{"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/posts\/441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=441"}],"version-history":[{"count":0,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/posts\/441\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}