{"id":6726,"date":"2020-03-18T14:16:47","date_gmt":"2020-03-18T06:16:47","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=6726"},"modified":"2020-05-23T21:27:23","modified_gmt":"2020-05-23T13:27:23","slug":"true","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/true","title":{"rendered":"true\u547d\u4ee4 – \u91cd\u5b9a\u5411\u6e05\u7a7a\u6587\u4ef6\u5185\u5bb9"},"content":{"rendered":"\n

true\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u5b9a\u5411\u6e05\u7a7a\u6587\u4ef6\u5185\u5bb9\u800c\u4e0d\u5220\u9664\u6587\u4ef6\u3002<\/p>\n\n\n\n

\u5728\u6709\u4e9bshell\u4e0ebash\u4e0btrue\u662f\u4e2a\u5185\u5efa\u547d\u4ee4\uff0c\u4e0e\u53ea\u8bbe\u7f6e\u9000\u51fa\u7801\u4e3a0\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f:<\/strong> true [\u6587\u4ef6]<\/p>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u6e05\u9664\u6307\u5b9a\u7684\u6587\u4ef6\u5185\u5bb9\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# true > linuxcool.log<\/pre>\n\n\n\n

bush\u4e0btrue\u662f\u547d\u4ee4\u6f14\u793a\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# type -a true\ntrue is a shell builtin\ntrue is \/bin\/true<\/pre>\n\n\n\n

\u8f93\u51fa\u4e00\u4e2a\u8fd4\u56de\u503c\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# true; echo $?\n0<\/pre>\n","protected":false},"excerpt":{"rendered":"

true\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u5b9a\u5411\u6e05\u7a7a\u6587\u4ef6\u5185\u5bb9\u800c\u4e0d\u5220\u9664\u6587\u4ef6\u3002 \u5728\u6709\u4e9bshell\u4e0ebash\u4e0btrue\u662f\u4e2a\u5185\u5efa\u547d\u4ee4\uff0c\u4e0e\u53ea\u8bbe\u7f6e […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6726"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=6726"}],"version-history":[{"count":8,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6726\/revisions"}],"predecessor-version":[{"id":7768,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6726\/revisions\/7768"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=6726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=6726"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=6726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}