<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.simcentric.com/sc/"},{"@type":"ListItem","position":2,"name":"为什么Linux命令运行时没有任何反应？","item":"https://www.simcentric.com/sc/hong-kong-dedicated-server-sc/why-dont-linux-commands-say-anything-when-they-run/"}]}</script> {"id":16959,"date":"2024-10-04T14:21:06","date_gmt":"2024-10-04T06:21:06","guid":{"rendered":"https:\/\/www.simcentric.com\/uncategorized-sc\/why-dont-linux-commands-say-anything-when-they-run\/"},"modified":"2024-10-04T14:26:44","modified_gmt":"2024-10-04T06:26:44","slug":"why-dont-linux-commands-say-anything-when-they-run","status":"publish","type":"post","link":"https:\/\/www.simcentric.com\/sc\/hong-kong-dedicated-server-sc\/why-dont-linux-commands-say-anything-when-they-run\/","title":{"rendered":"\u4e3a\u4ec0\u4e48Linux\u547d\u4ee4\u8fd0\u884c\u65f6\u6ca1\u6709\u4efb\u4f55\u53cd\u5e94\uff1f"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row el_class=&#8221;blog-detail-section&#8221;][vc_column][vc_column_text]<\/p>\n<p>\u5728<a href=\"https:\/\/www.simcentric.com\/sc\/products\/dedicated-server-hk\/\" target=\"_blank\" rel=\"noopener\">\u9999\u6e2f\u670d\u52a1\u5668\u79df\u7528<\/a>\u9886\u57df\uff0c<a href=\"https:\/\/www.simcentric.com\/sc\/hong-kong-dedicated-server-sc\/how-to-delete-gpg-key-in-linux\/\" target=\"_blank\" rel=\"noopener\">\u638c\u63e1Linux<\/a>\u547d\u4ee4\u884c\u64cd\u4f5c\u81f3\u5173\u91cd\u8981\u3002\u7136\u800c\uff0c\u5373\u4f7f\u662f\u7ecf\u9a8c\u4e30\u5bcc\u7684\u7cfb\u7edf\u7ba1\u7406\u5458\u5076\u5c14\u4e5f\u4f1a\u9047\u5230\u4e00\u4e2a\u4ee4\u4eba\u56f0\u60d1\u7684\u60c5\u51b5\uff1aLinux\u547d\u4ee4\u6267\u884c\u65f6\u6ca1\u6709\u663e\u793a\u4efb\u4f55\u8f93\u51fa\u3002\u8fd9\u79cd\u6c89\u9ed8\u53ef\u80fd\u4ee4\u4eba\u4e0d\u5b89\uff0c\u5c24\u5176\u662f\u5728\u7ba1\u7406\u5173\u952e\u57fa\u7840\u8bbe\u65bd\u65f6\u3002\u8ba9\u6211\u4eec\u6df1\u5165\u63a2\u8ba8\u8fd9\u4e2a\u547d\u4ee4\u884c\u96be\u9898\uff0c\u5e76\u63a2\u7d22\u6709\u6548\u7684\u6545\u969c\u6392\u9664\u7b56\u7565\u3002<\/p>\n<p>   [\/vc_column_text][\/vc_column][\/vc_row][vc_row el_class=&#8221;blog-detail-section&#8221;][vc_column][vc_column_text] <\/p>\n<h2><strong>\u9759\u9ed8\u5904\u7406\uff1a\u5f53\u547d\u4ee4\u53d8\u5f97\u6c89\u9ed8<\/strong><\/h2>\n<p>\u5728\u6211\u4eec\u5256\u6790\u547d\u4ee4\u9759\u9ed8\u7684\u539f\u56e0\u4e4b\u524d\uff0c\u91cd\u8981\u7684\u662f\u8981\u8ba4\u8bc6\u5230\u5e76\u975e\u6240\u6709\u7684\u5b89\u9759\u6267\u884c\u90fd\u8868\u793a\u5931\u8d25\u3002\u8bb8\u591aLinux\u547d\u4ee4\uff0c\u7279\u522b\u662f\u90a3\u4e9b\u8bbe\u8ba1\u7528\u4e8e\u6587\u4ef6\u64cd\u4f5c\u6216\u540e\u53f0\u8fdb\u7a0b\u7684\u547d\u4ee4\uff0c\u5728\u6210\u529f\u65f6\u6709\u610f\u5730\u9759\u9ed8\u8fd0\u884c\u3002\u7136\u800c\uff0c\u533a\u5206\u6709\u610f\u7684\u6c89\u9ed8\u548c\u6f5c\u5728\u95ee\u9898\u9700\u8981\u5bf9\u547d\u4ee4\u884c\u4e3a\u6709\u7ec6\u81f4\u7684\u7406\u89e3\u3002<\/p>\n<p>   [\/vc_column_text][\/vc_column][\/vc_row][vc_row el_class=&#8221;blog-detail-section&#8221;][vc_column][vc_column_text]   <\/p>\n<h2><strong>\u89e3\u7801\u6c89\u9ed8\uff1a\u5e38\u89c1\u539f\u56e0<\/strong><\/h2>\n<p>\u51e0\u4e2a\u56e0\u7d20\u53ef\u80fd\u5bfc\u81f4\u547d\u4ee4\u8f93\u51fa\u7684\u7f3a\u5931\uff1a<\/p>\n<ol>\n<li><strong>\u8bbe\u8ba1\u4e3a\u9759\u9ed8\uff1a<\/strong>\u50cf<code>cp<\/code>\u3001<code>mv<\/code>\u548c<code>mkdir<\/code>\u8fd9\u6837\u7684\u547d\u4ee4\u901a\u5e38\u4e0d\u4f1a\u4ea7\u751f\u8f93\u51fa\uff0c\u9664\u975e\u53d1\u751f\u9519\u8bef\u3002<\/li>\n<li><strong>\u8f93\u51fa\u91cd\u5b9a\u5411\uff1a<\/strong>\u547d\u4ee4\u7684\u8f93\u51fa\u53ef\u80fd\u88ab\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u6216\u901a\u8fc7\u7ba1\u9053\u4f20\u9012\u7ed9\u53e6\u4e00\u4e2a\u8fdb\u7a0b\u3002<\/li>\n<li><strong>\u6743\u9650\u4e0d\u8db3\uff1a<\/strong>\u7f3a\u4e4f\u5fc5\u8981\u7684\u6743\u9650\u53ef\u80fd\u4f1a\u963b\u6b62\u547d\u4ee4\u6267\u884c\u6216\u8f93\u51fa\u663e\u793a\u3002<\/li>\n<li><strong>\u73af\u5883\u53d8\u91cf\uff1a<\/strong>\u9519\u8bef\u8bbe\u7f6e\u7684\u53d8\u91cf\u53ef\u80fd\u5f71\u54cd\u547d\u4ee4\u884c\u4e3a\u3002<\/li>\n<li><strong>\u8d44\u6e90\u9650\u5236\uff1a<\/strong>\u7cfb\u7edf\u8d44\u6e90\u9650\u5236\u53ef\u80fd\u5f71\u54cd\u547d\u4ee4\u6267\u884c\u3002<\/li>\n<\/ol>\n<p>    [\/vc_column_text][\/vc_column][\/vc_row][vc_row el_class=&#8221;blog-detail-section&#8221;][vc_column][vc_column_text]  <\/p>\n<h2><strong>\u4fa6\u63a2\u5de5\u4f5c\uff1a\u63ed\u5f00\u9759\u9ed8\u547d\u4ee4\u7684\u9762\u7eb1<\/strong><\/h2>\n<p>\u8981\u89e3\u5f00\u9759\u9ed8\u547d\u4ee4\u7684\u8c1c\u56e2\uff0c\u8bf7\u4f7f\u7528\u8fd9\u4e9b\u8c03\u8bd5\u6280\u5de7\uff1a<\/p>\n<h3>1. \u6fc0\u6d3b\u8be6\u7ec6\u6a21\u5f0f<\/h3>\n<p>\u8bb8\u591a\u547d\u4ee4\u63d0\u4f9b\u8be6\u7ec6\u6216\u8c03\u8bd5\u6a21\u5f0f\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code>$ cp -v source_file destination_file\r\n'source_file' -> 'destination_file'<\/code><\/pre>\n<h3>2. \u9519\u8bef\u91cd\u5b9a\u5411<\/h3>\n<p>\u901a\u8fc7\u91cd\u5b9a\u5411stderr\u6765\u6355\u83b7\u6f5c\u5728\u7684\u9519\u8bef\u6d88\u606f\uff1a<\/p>\n<pre><code>$ some_command 2> error.log\r\n$ cat error.log<\/code><\/pre>\n<h3>3. \u547d\u4ee4\u94fe\u63a5<\/h3>\n<p>\u4f7f\u7528\u547d\u4ee4\u94fe\u63a5\u6765\u9a8c\u8bc1\u6267\u884c\uff1a<\/p>\n<pre><code>$ silent_command && echo \"\u547d\u4ee4\u6210\u529f\u6267\u884c\" || echo \"\u547d\u4ee4\u6267\u884c\u5931\u8d25\"<\/code><\/pre>\n<h3>4. \u4f7f\u7528Strace\u6df1\u5165\u5206\u6790<\/h3>\n<p>\u5bf9\u4e8e\u6df1\u5ea6\u8c03\u8bd5\uff0c\u4f7f\u7528<code>strace<\/code>\u8ddf\u8e2a\u7cfb\u7edf\u8c03\u7528\uff1a<\/p>\n<pre><code>$ strace -e trace=write silent_command<\/code><\/pre>\n<p>   [\/vc_column_text][\/vc_column][\/vc_row][vc_row el_class=&#8221;blog-detail-section&#8221;][vc_column][vc_column_text]   <\/p>\n<h2><strong>\u9999\u6e2f\u670d\u52a1\u5668\u7279\u6027\uff1a\u5e94\u5bf9\u672c\u5730\u6311\u6218<\/strong><\/h2>\n<p>\u5728\u9999\u6e2f\u670d\u52a1\u5668\u4e0a\u6392\u67e5\u9759\u9ed8\u547d\u4ee4\u6545\u969c\u65f6\uff0c\u8bf7\u8003\u8651\u8fd9\u4e9b\u72ec\u7279\u56e0\u7d20\uff1a<\/p>\n<h3>\u7f51\u7edc\u5ef6\u8fdf<\/h3>\n<p>\u9ad8\u5ef6\u8fdf\u6709\u65f6\u4f1a\u5bfc\u81f4\u547d\u4ee4\u8f93\u51fa\u5ef6\u8fdf\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6d4b\u8bd5\uff1a<\/p>\n<pre><code>$ time curl -s https:\/\/www.example.com > \/dev\/null<\/code><\/pre>\n<h3>\u5b57\u7b26\u7f16\u7801<\/h3>\n<p>\u591a\u8bed\u8a00\u73af\u5883\u53ef\u80fd\u9762\u4e34\u7f16\u7801\u95ee\u9898\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u9a8c\u8bc1\uff1a<\/p>\n<pre><code>$ locale\r\n$ echo $LANG<\/code><\/pre>\n<h3>\u5b89\u5168\u9650\u5236<\/h3>\n<p>\u4e00\u4e9b\u9999\u6e2f\u670d\u52a1\u5668\u6258\u7ba1\u8bbe\u65bd\u5b9e\u65bd\u4e25\u683c\u7684\u5b89\u5168\u7b56\u7565\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5\uff1a<\/p>\n<pre><code>$ sestatus\r\n$ getenforce<\/code><\/pre>\n<p>   [\/vc_column_text][\/vc_column][\/vc_row][vc_row el_class=&#8221;blog-detail-section&#8221;][vc_column][vc_column_text]   <\/p>\n<h2><strong>\u63d0\u5347\u6280\u80fd\uff1a\u547d\u4ee4\u884c\u5fcd\u8005\u7684\u6700\u4f73\u5b9e\u8df5<\/strong><\/h2>\n<p>\u5c06\u8fd9\u4e9b\u6280\u5de7\u7eb3\u5165\u4f60\u7684Linux\u6280\u80fd\u4e2d\uff1a<\/p>\n<h3>1. \u56de\u58f0\u5b9a\u4f4d<\/h3>\n<p>\u5728\u4f60\u7684\u811a\u672c\u4e2d\u5927\u91cf\u4f7f\u7528echo\u8bed\u53e5\uff1a<\/p>\n<pre><code>#!\/bin\/bash\r\necho \"\u5f00\u59cb\u64cd\u4f5c...\"\r\nsilent_command\r\necho \"\u64cd\u4f5c\u5b8c\u6210\u3002\"<\/code><\/pre>\n<h3>2. Set -x \u9b54\u6cd5<\/h3>\n<p>\u4f7f\u7528<code>set -x<\/code>\u542f\u7528bash\u8c03\u8bd5\uff1a<\/p>\n<pre><code>#!\/bin\/bash\r\nset -x\r\nsilent_command\r\nset +x<\/code><\/pre>\n<h3>3. \u6355\u83b7\u90a3\u4e9b\u9519\u8bef<\/h3>\n<p>\u5728\u4f60\u7684\u811a\u672c\u4e2d\u5b9e\u73b0\u9519\u8bef\u6355\u83b7\uff1a<\/p>\n<pre><code>#!\/bin\/bash\r\ntrap 'echo \"\u5728\u7b2c $LINENO \u884c\u53d1\u751f\u9519\u8bef\"; exit 1' ERR\r\nsilent_command<\/code><\/pre>\n<p>   [\/vc_column_text][\/vc_column][\/vc_row][vc_row el_class=&#8221;blog-detail-section&#8221;][vc_column][vc_column_text]   <\/p>\n<h2><strong>\u7ed3\u8bba<\/strong><\/h2>\n<p>\u7406\u89e3\u548c\u6392\u67e5\u9759\u9ed8Linux\u547d\u4ee4\u662f\u4efb\u4f55\u9999\u6e2f\u670d\u52a1\u5668\u7ba1\u7406\u5458\u7684\u5fc5\u5907\u6280\u80fd\u3002\u901a\u8fc7\u8fd0\u7528\u672c\u6307\u5357\u4e2d\u6982\u8ff0\u7684\u6280\u5de7\uff0c\u4f60\u5c06\u80fd\u591f\u5f88\u597d\u5730\u89e3\u7801\u6c89\u9ed8\u5e76\u4fdd\u6301\u6700\u4f73\u670d\u52a1\u5668\u6027\u80fd\u3002\u8bf7\u8bb0\u4f4f\uff0c\u5728Linux\u4e16\u754c\u4e2d\uff0c\u6c89\u9ed8\u5e76\u4e0d\u603b\u662f\u91d1\u5b50 &#8211; \u4f46\u5b83\u603b\u662f\u63d0\u5347\u8c03\u8bd5\u6280\u80fd\u7684\u673a\u4f1a\u3002<\/p>\n<p>   [\/vc_column_text][\/vc_column][\/vc_row][vc_row el_class=&#8221;blog-detail-section&#8221;][vc_column][vc_column_text]   <\/p>\n<h2><strong>\u5e38\u89c1\u95ee\u9898\u89e3\u7b54\uff1a\u89e3\u51b3\u4f60\u7684\u547d\u4ee4\u884c\u7591\u8651<\/strong><\/h2>\n<ol>\n<li>\n            <strong>\u95ee\uff1a\u4e3a\u4ec0\u4e48&#8217;ls&#8217;\u547d\u4ee4\u9ed8\u8ba4\u4e0d\u663e\u793a\u9690\u85cf\u6587\u4ef6\uff1f<\/strong><br \/>\n            \u7b54\uff1aLinux\u4e2d\u7684\u9690\u85cf\u6587\u4ef6\u4ee5\u70b9(.)\u5f00\u5934\uff0c\u6709\u610f\u4ece\u6807\u51c6&#8217;ls&#8217;\u8f93\u51fa\u4e2d\u6392\u9664\u3002\u4f7f\u7528&#8217;ls -a&#8217;\u53ef\u4ee5\u67e5\u770b\u6240\u6709\u6587\u4ef6\uff0c\u5305\u62ec\u9690\u85cf\u6587\u4ef6\u3002\n        <\/li>\n<li>\n            <strong>\u95ee\uff1a\u5982\u4f55\u8ba9\u901a\u5e38\u9759\u9ed8\u7684\u547d\u4ee4\u66f4\u8be6\u7ec6\uff1f<\/strong><br \/>\n            \u7b54\uff1a\u8bb8\u591a\u547d\u4ee4\u63d0\u4f9b\u5982-v\uff08\u8be6\u7ec6\uff09\u6216-x\uff08\u8c03\u8bd5\uff09\u7b49\u6807\u5fd7\u3002\u67e5\u9605\u547d\u4ee4\u7684man\u9875\u9762\u4ee5\u83b7\u53d6\u5177\u4f53\u9009\u9879\u3002\n        <\/li>\n<li>\n            <strong>\u95ee\uff1a\u6709\u6ca1\u6709\u9999\u6e2f\u7279\u6709\u7684Linux\u670d\u52a1\u5668\u7ba1\u7406\u8d44\u6e90\uff1f<\/strong><br \/>\n            \u7b54\uff1a\u67e5\u770b\u672c\u5730\u6280\u672f\u793e\u533a\u548c\u8bba\u575b\uff0c\u5982\u9999\u6e2fLinux\u7528\u6237\u7ec4\uff08HKLUG\uff09\uff0c\u83b7\u53d6\u5730\u533a\u7279\u5b9a\u5efa\u8bae\u548c\u7f51\u7edc\u673a\u4f1a\u3002\n        <\/li>\n<\/ol>\n<p>\u901a\u8fc7\u638c\u63e1\u8fd9\u4e9bLinux\u547d\u4ee4\u884c\u6545\u969c\u6392\u9664\u6280\u5de7\uff0c\u4f60\u5c06\u628a\u4f60\u7684\u9999\u6e2f\u670d\u52a1\u5668\u79df\u7528\u6e38\u620f\u63d0\u5347\u5230\u65b0\u7684\u9ad8\u5ea6\u3002\u8bb0\u4f4f\uff0c\u5728\u547d\u4ee4\u884c\u64cd\u4f5c\u7684\u9759\u9ed8\u4e16\u754c\u4e2d\uff0c\u4f60\u7684\u8c03\u8bd5\u6280\u80fd\u662f\u4f60\u6700\u5f3a\u5927\u7684\u5de5\u5177\u3002\u7ee7\u7eed\u63a2\u7d22\uff0c\u7ee7\u7eed\u5b66\u4e60\uff0c\u613f\u4f60\u7684\u670d\u52a1\u5668\u6c38\u8fdc\u8fd0\u884c\u987a\u7545\uff01<\/p>\n<p>[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>[vc_row el_class=&#8221;blog-detail-section&#8221;][vc_column][vc_column_text] \u5728\u9999\u6e2f\u670d\u52a1\u5668\u79df\u7528\u9886\u57df\uff0c\u638c\u63e1Linux\u547d\u4ee4\u884c\u64cd\u4f5c\u81f3\u5173\u91cd\u8981\u3002\u7136\u800c\uff0c\u5373\u4f7f\u662f\u7ecf\u9a8c\u4e30\u5bcc\u7684\u7cfb\u7edf\u7ba1\u7406\u5458\u5076\u5c14\u4e5f\u4f1a\u9047\u5230\u4e00\u4e2a\u4ee4\u4eba\u56f0\u60d1\u7684\u60c5\u51b5\uff1aLinux\u547d\u4ee4\u6267\u884c\u65f6\u6ca1\u6709\u663e\u793a\u4efb\u4f55\u8f93\u51fa\u3002\u8fd9\u79cd\u6c89\u9ed8\u53ef\u80fd\u4ee4\u4eba\u4e0d\u5b89\uff0c\u5c24\u5176\u662f\u5728\u7ba1\u7406\u5173\u952e\u57fa\u7840\u8bbe\u65bd\u65f6\u3002\u8ba9\u6211\u4eec\u6df1\u5165\u63a2\u8ba8\u8fd9\u4e2a\u547d\u4ee4\u884c\u96be\u9898\uff0c\u5e76\u63a2\u7d22\u6709\u6548\u7684\u6545\u969c\u6392\u9664\u7b56\u7565\u3002 [\/vc_column_text][\/vc_column][\/vc_row][vc_row el_class=&#8221;blog-detail-section&#8221;][vc_column][vc_column_text] \u9759\u9ed8\u5904\u7406\uff1a\u5f53\u547d\u4ee4\u53d8\u5f97\u6c89\u9ed8 \u5728\u6211\u4eec\u5256\u6790\u547d\u4ee4\u9759\u9ed8\u7684\u539f\u56e0\u4e4b\u524d\uff0c\u91cd\u8981\u7684\u662f\u8981\u8ba4\u8bc6\u5230\u5e76\u975e\u6240\u6709\u7684\u5b89\u9759\u6267\u884c\u90fd\u8868\u793a\u5931\u8d25\u3002\u8bb8\u591aLinux\u547d\u4ee4\uff0c\u7279\u522b\u662f\u90a3\u4e9b\u8bbe\u8ba1\u7528\u4e8e\u6587\u4ef6\u64cd\u4f5c\u6216\u540e\u53f0\u8fdb\u7a0b\u7684\u547d\u4ee4\uff0c\u5728\u6210\u529f\u65f6\u6709\u610f\u5730\u9759\u9ed8\u8fd0\u884c\u3002\u7136\u800c\uff0c\u533a\u5206\u6709\u610f\u7684\u6c89\u9ed8\u548c\u6f5c\u5728\u95ee\u9898\u9700\u8981\u5bf9\u547d\u4ee4\u884c\u4e3a\u6709\u7ec6\u81f4\u7684\u7406\u89e3\u3002 [\/vc_column_text][\/vc_column][\/vc_row][vc_row el_class=&#8221;blog-detail-section&#8221;][vc_column][vc_column_text] \u89e3\u7801\u6c89\u9ed8\uff1a\u5e38\u89c1\u539f\u56e0 \u51e0\u4e2a\u56e0\u7d20\u53ef\u80fd\u5bfc\u81f4\u547d\u4ee4\u8f93\u51fa\u7684\u7f3a\u5931\uff1a \u8bbe\u8ba1\u4e3a\u9759\u9ed8\uff1a\u50cfcp\u3001mv\u548cmkdir\u8fd9\u6837\u7684\u547d\u4ee4\u901a\u5e38\u4e0d\u4f1a\u4ea7\u751f\u8f93\u51fa\uff0c\u9664\u975e\u53d1\u751f\u9519\u8bef\u3002 \u8f93\u51fa\u91cd\u5b9a\u5411\uff1a\u547d\u4ee4\u7684\u8f93\u51fa\u53ef\u80fd\u88ab\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u6216\u901a\u8fc7\u7ba1\u9053\u4f20\u9012\u7ed9\u53e6\u4e00\u4e2a\u8fdb\u7a0b\u3002 \u6743\u9650\u4e0d\u8db3\uff1a\u7f3a\u4e4f\u5fc5\u8981\u7684\u6743\u9650\u53ef\u80fd\u4f1a\u963b\u6b62\u547d\u4ee4\u6267\u884c\u6216\u8f93\u51fa\u663e\u793a\u3002 \u73af\u5883\u53d8\u91cf\uff1a\u9519\u8bef\u8bbe\u7f6e\u7684\u53d8\u91cf\u53ef\u80fd\u5f71\u54cd\u547d\u4ee4\u884c\u4e3a\u3002 \u8d44\u6e90\u9650\u5236\uff1a\u7cfb\u7edf\u8d44\u6e90\u9650\u5236\u53ef\u80fd\u5f71\u54cd\u547d\u4ee4\u6267\u884c\u3002 [\/vc_column_text][\/vc_column][\/vc_row][vc_row el_class=&#8221;blog-detail-section&#8221;][vc_column][vc_column_text] \u4fa6\u63a2\u5de5\u4f5c\uff1a\u63ed\u5f00\u9759\u9ed8\u547d\u4ee4\u7684\u9762\u7eb1 \u8981\u89e3\u5f00\u9759\u9ed8\u547d\u4ee4\u7684\u8c1c\u56e2\uff0c\u8bf7\u4f7f\u7528\u8fd9\u4e9b\u8c03\u8bd5\u6280\u5de7\uff1a 1. \u6fc0\u6d3b\u8be6\u7ec6\u6a21\u5f0f \u8bb8\u591a\u547d\u4ee4\u63d0\u4f9b\u8be6\u7ec6\u6216\u8c03\u8bd5\u6a21\u5f0f\u3002\u4f8b\u5982\uff1a $ cp -v source_file destination_file &#8216;source_file&#8217; -> &#8216;destination_file&#8217; 2. \u9519\u8bef\u91cd\u5b9a\u5411 \u901a\u8fc7\u91cd\u5b9a\u5411stderr\u6765\u6355\u83b7\u6f5c\u5728\u7684\u9519\u8bef\u6d88\u606f\uff1a $ some_command 2> error.log $ cat error.log 3. \u547d\u4ee4\u94fe\u63a5 \u4f7f\u7528\u547d\u4ee4\u94fe\u63a5\u6765\u9a8c\u8bc1\u6267\u884c\uff1a $ silent_command &#038;&#038; echo &#8220;\u547d\u4ee4\u6210\u529f\u6267\u884c&#8221; || echo &#8220;\u547d\u4ee4\u6267\u884c\u5931\u8d25&#8221; 4. \u4f7f\u7528Strace\u6df1\u5165\u5206\u6790 \u5bf9\u4e8e\u6df1\u5ea6\u8c03\u8bd5\uff0c\u4f7f\u7528strace\u8ddf\u8e2a\u7cfb\u7edf\u8c03\u7528\uff1a [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"https:\/\/www.simcentric.com\/sc\/hong-kong-dedicated-server-sc\/why-dont-linux-commands-say-anything-when-they-run\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":3,"featured_media":16954,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[62],"tags":[3936,3935,3937,3646,265],"class_list":["post-16959","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hong-kong-dedicated-server-sc","tag-silent-execution-sc","tag-command-line-troubleshooting-sc","tag-debugging-techniques-sc","tag-linux-commands-sc","tag-265"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u4e3a\u4ec0\u4e48Linux\u547d\u4ee4\u8fd0\u884c\u65f6\u6ca1\u6709\u4efb\u4f55\u53cd\u5e94\uff1f<\/title>\n<meta name=\"description\" content=\"\u63ed\u5f00\u670d\u52a1\u5668\u4e0a\u9759\u9ed8Linux\u547d\u4ee4\u7684\u5965\u79d8\u3002\u5b66\u4e60\u8c03\u8bd5\u6280\u5de7\uff0c\u4e86\u89e3\u5e38\u89c1\u95ee\u9898\uff0c\u638c\u63e1\u547d\u4ee4\u884c\u6545\u969c\u6392\u9664\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.simcentric.com\/sc\/wp-json\/wp\/v2\/posts\/16959\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"company\" \/>\n<meta property=\"og:title\" content=\"\u4e3a\u4ec0\u4e48Linux\u547d\u4ee4\u8fd0\u884c\u65f6\u6ca1\u6709\u4efb\u4f55\u53cd\u5e94\uff1f\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.simcentric.com\/sc\/wp-json\/wp\/v2\/posts\/16959\" \/>\n<meta property=\"og:site_name\" content=\"\u65b0\u5929\u57df\u4e92\u8054\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-04T06:21:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-04T06:26:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.simcentric.com\/wp-content\/uploads\/2024\/10\/sim_1004a.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"611\" \/>\n\t<meta property=\"og:image:height\" content=\"340\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4e3a\u4ec0\u4e48Linux\u547d\u4ee4\u8fd0\u884c\u65f6\u6ca1\u6709\u4efb\u4f55\u53cd\u5e94\uff1f","description":"\u63ed\u5f00\u670d\u52a1\u5668\u4e0a\u9759\u9ed8Linux\u547d\u4ee4\u7684\u5965\u79d8\u3002\u5b66\u4e60\u8c03\u8bd5\u6280\u5de7\uff0c\u4e86\u89e3\u5e38\u89c1\u95ee\u9898\uff0c\u638c\u63e1\u547d\u4ee4\u884c\u6545\u969c\u6392\u9664\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.simcentric.com\/sc\/wp-json\/wp\/v2\/posts\/16959","og_locale":"zh_CN","og_type":"company","og_title":"\u4e3a\u4ec0\u4e48Linux\u547d\u4ee4\u8fd0\u884c\u65f6\u6ca1\u6709\u4efb\u4f55\u53cd\u5e94\uff1f","og_url":"https:\/\/www.simcentric.com\/sc\/wp-json\/wp\/v2\/posts\/16959","og_site_name":"\u65b0\u5929\u57df\u4e92\u8054","article_published_time":"2024-10-04T06:21:06+00:00","article_modified_time":"2024-10-04T06:26:44+00:00","og_image":[{"width":611,"height":340,"url":"https:\/\/www.simcentric.com\/wp-content\/uploads\/2024\/10\/sim_1004a.jpg","type":"image\/jpeg"}],"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.simcentric.com\/sc\/hong-kong-dedicated-server-sc\/why-dont-linux-commands-say-anything-when-they-run\/#article","isPartOf":{"@id":"https:\/\/www.simcentric.com\/sc\/hong-kong-dedicated-server-sc\/why-dont-linux-commands-say-anything-when-they-run\/"},"author":{"name":"Felix Cheung","@id":"https:\/\/simcentric.com\/tc\/#\/schema\/person\/2865b3454f789caf7083a203799d4a6d"},"headline":"\u4e3a\u4ec0\u4e48Linux\u547d\u4ee4\u8fd0\u884c\u65f6\u6ca1\u6709\u4efb\u4f55\u53cd\u5e94\uff1f","datePublished":"2024-10-04T06:21:06+00:00","dateModified":"2024-10-04T06:26:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.simcentric.com\/sc\/hong-kong-dedicated-server-sc\/why-dont-linux-commands-say-anything-when-they-run\/"},"wordCount":162,"publisher":{"@id":"https:\/\/simcentric.com\/tc\/#organization"},"image":{"@id":"https:\/\/www.simcentric.com\/sc\/hong-kong-dedicated-server-sc\/why-dont-linux-commands-say-anything-when-they-run\/#primaryimage"},"thumbnailUrl":"https:\/\/www.simcentric.com\/wp-content\/uploads\/2024\/10\/sim_1004a.jpg","keywords":["\u9759\u9ed8\u6267\u884c","\u547d\u4ee4\u884c\u6545\u969c\u6392\u9664","\u8c03\u8bd5\u6280\u5de7","Linux\u547d\u4ee4","\u9999\u6e2f\u670d\u52a1\u5668"],"articleSection":["\u9999\u6e2f\u670d\u52a1\u5668"],"inLanguage":"zh-CHN"},{"@type":"WebPage","@id":"https:\/\/www.simcentric.com\/sc\/hong-kong-dedicated-server-sc\/why-dont-linux-commands-say-anything-when-they-run\/","url":"https:\/\/www.simcentric.com\/sc\/hong-kong-dedicated-server-sc\/why-dont-linux-commands-say-anything-when-they-run\/","name":"\u4e3a\u4ec0\u4e48Linux\u547d\u4ee4\u8fd0\u884c\u65f6\u6ca1\u6709\u4efb\u4f55\u53cd\u5e94\uff1f","isPartOf":{"@id":"https:\/\/simcentric.com\/tc\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.simcentric.com\/sc\/hong-kong-dedicated-server-sc\/why-dont-linux-commands-say-anything-when-they-run\/#primaryimage"},"image":{"@id":"https:\/\/www.simcentric.com\/sc\/hong-kong-dedicated-server-sc\/why-dont-linux-commands-say-anything-when-they-run\/#primaryimage"},"thumbnailUrl":"https:\/\/www.simcentric.com\/wp-content\/uploads\/2024\/10\/sim_1004a.jpg","datePublished":"2024-10-04T06:21:06+00:00","dateModified":"2024-10-04T06:26:44+00:00","description":"\u63ed\u5f00\u670d\u52a1\u5668\u4e0a\u9759\u9ed8Linux\u547d\u4ee4\u7684\u5965\u79d8\u3002\u5b66\u4e60\u8c03\u8bd5\u6280\u5de7\uff0c\u4e86\u89e3\u5e38\u89c1\u95ee\u9898\uff0c\u638c\u63e1\u547d\u4ee4\u884c\u6545\u969c\u6392\u9664\u3002","breadcrumb":{"@id":"https:\/\/www.simcentric.com\/sc\/hong-kong-dedicated-server-sc\/why-dont-linux-commands-say-anything-when-they-run\/#breadcrumb"},"inLanguage":"zh-CHN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.simcentric.com\/sc\/hong-kong-dedicated-server-sc\/why-dont-linux-commands-say-anything-when-they-run\/"]}]},{"@type":"ImageObject","inLanguage":"zh-CHN","@id":"https:\/\/www.simcentric.com\/sc\/hong-kong-dedicated-server-sc\/why-dont-linux-commands-say-anything-when-they-run\/#primaryimage","url":"https:\/\/www.simcentric.com\/wp-content\/uploads\/2024\/10\/sim_1004a.jpg","contentUrl":"https:\/\/www.simcentric.com\/wp-content\/uploads\/2024\/10\/sim_1004a.jpg","width":611,"height":340},{"@type":"BreadcrumbList","@id":"https:\/\/www.simcentric.com\/sc\/hong-kong-dedicated-server-sc\/why-dont-linux-commands-say-anything-when-they-run\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.simcentric.com\/sc\/"},{"@type":"ListItem","position":2,"name":"\u4e3a\u4ec0\u4e48Linux\u547d\u4ee4\u8fd0\u884c\u65f6\u6ca1\u6709\u4efb\u4f55\u53cd\u5e94\uff1f"}]},{"@type":"WebSite","@id":"https:\/\/simcentric.com\/tc\/#website","url":"https:\/\/simcentric.com\/tc\/","name":"Simcentric Solutions","description":"","publisher":{"@id":"https:\/\/simcentric.com\/tc\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/simcentric.com\/tc\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-CHN"},{"@type":"Organization","@id":"https:\/\/simcentric.com\/tc\/#organization","name":"Simcentric Solutions","url":"https:\/\/simcentric.com\/tc\/","logo":{"@type":"ImageObject","inLanguage":"zh-CHN","@id":"https:\/\/simcentric.com\/tc\/#\/schema\/logo\/image\/","url":"https:\/\/www.simcentric.com\/wp-content\/uploads\/2023\/06\/sim-logo-2023.png","contentUrl":"https:\/\/www.simcentric.com\/wp-content\/uploads\/2023\/06\/sim-logo-2023.png","width":800,"height":222,"caption":"Simcentric Solutions"},"image":{"@id":"https:\/\/simcentric.com\/tc\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/simcentric.com\/tc\/#\/schema\/person\/2865b3454f789caf7083a203799d4a6d","name":"Felix Cheung","image":{"@type":"ImageObject","inLanguage":"zh-CHN","@id":"https:\/\/secure.gravatar.com\/avatar\/836e6f2be80c47f0897198ffea03fae331dad9aaafbc988c752691eb595e0e2f?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/836e6f2be80c47f0897198ffea03fae331dad9aaafbc988c752691eb595e0e2f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/836e6f2be80c47f0897198ffea03fae331dad9aaafbc988c752691eb595e0e2f?s=96&d=mm&r=g","caption":"Felix Cheung"}}]}},"_links":{"self":[{"href":"https:\/\/www.simcentric.com\/sc\/wp-json\/wp\/v2\/posts\/16959","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.simcentric.com\/sc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.simcentric.com\/sc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.simcentric.com\/sc\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.simcentric.com\/sc\/wp-json\/wp\/v2\/comments?post=16959"}],"version-history":[{"count":2,"href":"https:\/\/www.simcentric.com\/sc\/wp-json\/wp\/v2\/posts\/16959\/revisions"}],"predecessor-version":[{"id":16965,"href":"https:\/\/www.simcentric.com\/sc\/wp-json\/wp\/v2\/posts\/16959\/revisions\/16965"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.simcentric.com\/sc\/wp-json\/wp\/v2\/media\/16954"}],"wp:attachment":[{"href":"https:\/\/www.simcentric.com\/sc\/wp-json\/wp\/v2\/media?parent=16959"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.simcentric.com\/sc\/wp-json\/wp\/v2\/categories?post=16959"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.simcentric.com\/sc\/wp-json\/wp\/v2\/tags?post=16959"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}