{"id":51188,"date":"2025-08-10T18:41:12","date_gmt":"2025-08-10T10:41:12","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/51188.html"},"modified":"2025-08-10T18:41:12","modified_gmt":"2025-08-10T10:41:12","slug":"linux%e5%b0%8f%e7%99%bd%e4%bb%ac%e5%bf%85%e7%9f%a5%e7%9a%84%e7%b3%bb%e7%bb%9f%e6%96%87%e4%bb%b6%e4%b8%8e%e7%9b%ae%e5%bd%95%e5%86%85%e5%ae%b9%e6%a3%80%e7%b4%a2%ef%bc%88%e4%ba%8c%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/51188.html","title":{"rendered":"Linux\u5c0f\u767d\u4eec\u5fc5\u77e5\u7684\u7cfb\u7edf\u6587\u4ef6\u4e0e\u76ee\u5f55\u5185\u5bb9\u68c0\u7d22\uff08\u4e8c\uff09"},"content":{"rendered":"<h2>\u4e00\u3001\u6587\u4ef6\u548c\u76ee\u5f55\u5185\u5bb9\u68c0\u7d22\u5904\u7406\u547d\u4ee4<\/h2>\n<h3>5\u3001tr\u8f6c\u6362<\/h3>\n<p>tr \u547d\u4ee4\u662f Unix \u548c\u7c7b Unix \u7cfb\u7edf\u4e2d\u7684\u4e00\u4e2a\u7528\u4e8e\u5b57\u7b26\u8f6c\u6362\u6216\u5220\u9664\u7684\u5b9e\u7528\u7a0b\u5e8f\u3002tr \u547d\u4ee4\u901a\u5e38\u7528\u4e8e\u5904\u7406\u6587\u672c\u6570\u636e&#xff0c;\u4f8b\u5982\u5220\u9664\u7279\u5b9a\u5b57\u7b26\u3001\u66ff\u6362\u5b57\u7b26\u3001\u8f6c\u6362\u5927\u5c0f\u5199\u7b49\u64cd\u4f5c\u3002<\/p>\n<p>\u8bed\u6cd5&#xff1a;\u00a0 \u00a0<span style=\"color:#ff9900\"> \u00a0tr [options] set1 set2<\/span><\/p>\n<p><span style=\"color:#ff9900\">\u9009\u9879&#xff1a;\u00a0<\/span><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"118\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104102-6898773ee6b91.png\" width=\"595\" \/><\/p>\n<p>\u6848\u4f8b&#xff1a;<\/p>\n<p>1\u3001<\/p>\n<p>&#xff08;1&#xff09;\u5c06\u6587\u672c\u4e2d\u7684\u5927\u5199\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5c0f\u5199\u5b57\u6bcd&#xff1a;\u00a0 \u00a0 echo &#034;HELLO&#034; | tr &#039;A-Z&#039; &#039;a-z&#039;<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"156\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104103-6898773f7c47c.png\" width=\"366\" \/><\/p>\n<p>&#xff08;2&#xff09;\u5220\u9664\u6587\u672c\u4e2d\u7684\u7a7a\u683c&#xff1a;echo &#034;hello world&#034; | tr -d &#039; &#039;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"154\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104103-6898773f9de81.png\" width=\"416\" \/><\/p>\n<p>&#xff08;3&#xff09;\u5c06\u6587\u672c\u4e2d\u7684\u7279\u5b9a\u5b57\u7b26\u66ff\u6362\u4e3a\u53e6\u4e00\u4e2a\u5b57\u7b26&#xff1a;echo &#034;abc-&#034; | tr &#039;a-z&#039; &#039;X-Y&#039;<\/p>\n<p>&#xff08;4)\u538b\u7f29\u91cd\u590d\u5b57\u7b26&#xff1a;echo &#034;foo \u00a0 \u00a0 bar&#034; | tr -s &#039; &#039;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"144\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104103-6898773fe5549.png\" width=\"461\" \/><\/p>\n<p>\u00a0 \u00a0(5)\u53bb\u6389\u7a7a\u767d\u7b26:echo &#034;hello\\\\tworld&#034; | tr -d &#039;[:space:]&#039;<\/p>\n<h3>6\u3001cut\u5207\u5272<\/h3>\n<p>cut \u662f Unix \u548c\u7c7b Unix \u7cfb\u7edf\u4e2d\u7684\u547d\u4ee4&#xff0c;\u7528\u4e8e\u6839\u636e\u6307\u5b9a\u7684\u5b57\u7b26\u5206\u9694\u7b26\u4ece\u8f93\u5165\u4e2d\u63d0\u53d6\u5b57\u6bb5\u3002cut \u547d\u4ee4\u7528\u4e8e\u5904\u7406\u6587\u672c\u6587\u4ef6&#xff0c;\u901a\u5e38\u4e0e\u7ba1\u9053 (|) \u548c\u5176\u4ed6\u547d\u4ee4\u4e00\u8d77\u4f7f\u7528&#xff0c;\u4ee5\u8fdb\u4e00\u6b65\u5904\u7406\u548c\u5206\u6790\u6587\u672c\u6570\u636e\u3002<\/p>\n<p>\u8bed\u6cd5&#xff1a; cut [options] [field-spec]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"58\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104104-6898774056dcf.png\" width=\"492\" \/><\/p>\n<p>\u6848\u4f8b&#xff1a;<\/p>\n<p>\u4ee5\u4e0b\u662f\u4f7f\u7528 cut \u547d\u4ee4\u7684\u4e00\u4e9b\u793a\u4f8b&#xff1a;<\/p>\n<p>(1)\u63d0\u53d6\u6307\u5b9a\u8303\u56f4\u5185\u7684\u5b57\u6bb5&#xff1a;(\u8fde\u7eed)\u00a0 \u00a0 \u00a0 \u00a0 cut -d &#039;:&#039; -f 1-3 file.txt\u00a0\u00a0<\/p>\n<p>(2)\u4f7f\u7528\u5236\u8868\u7b26\u4f5c\u4e3a\u5206\u9694\u7b26\u63d0\u53d6\u5b57\u6bb5&#xff1a;\u00a0\u00a0cut -d $&#039;\\\\t&#039; -f 1 file.txt<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"92\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104104-68987740cf6d5.png\" width=\"1029\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"284\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104105-689877410de30.png\" width=\"1112\" \/><\/p>\n<\/p>\n<p>(3)\u63d0\u53d6\u6307\u5b9a\u6587\u4ef6\u4e2d\u7684\u6240\u6709\u5b57\u6bb5:\u00a0 \u00a0cut -d &#039;:&#039; -f * file.txt (<span style=\"color:#fe2c24\">rocky9\u4e2d\u4e0d\u80fd\u4f7f\u7528<\/span>)<\/p>\n<p>(4)\u4ec5\u63d0\u53d6\u975e\u7a7a\u767d\u5b57\u6bb5&#xff1a;cut -b 3 file.txt<\/p>\n<p>(5)\u4f7f\u7528\u901a\u914d\u7b26\u63d0\u53d6\u591a\u4e2a\u5b57\u6bb5&#xff1a;&#xff08;\u53ef\u4ee5\u4e0d\u8fde\u7eed&#xff09;\u00a0\u00a0cut -d&#039;:&#039; -f 1,2,3 file.txt<\/p>\n<p>(6)\u7edf\u8ba1messages&#xff08;\u7cfb\u7edf&#xff09;\u65e5\u5fd7\u6bcf\u4e2a\u65f6\u95f4\u70b9\u4ea7\u751f\u65e5\u5fd7\u7684\u6761\u76ee\u6570\u91cf\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0cut -d&#039; &#039; -f 4 messages | cut -d &#039;:&#039; -f 1 | uniq -c<\/p>\n<p>(7) \u7edf\u8ba1web\u7ad9\u70b9\u8bbf\u95ee\u7528\u6237\u6570:\u00a0<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"73\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104105-6898774177474.png\" width=\"513\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"141\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104105-689877419e07e.png\" width=\"1206\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"409\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104106-689877422411b.png\" width=\"488\" \/><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"144\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104106-68987742b6f6f.png\" width=\"504\" \/><\/p>\n<h3>7\u3001which\u547d\u4ee4<\/h3>\n<p>which \u547d\u4ee4\u5728 Unix \u548c\u7c7b Unix \u7cfb\u7edf\u4e2d\u7528\u4e8e\u67e5\u627e\u4e00\u4e2a\u547d\u4ee4\u7684\u5b8c\u6574\u8def\u5f84\u3002\u5f53\u60a8\u8f93\u5165\u4e00\u4e2a\u547d\u4ee4\u540d\u79f0\u65f6&#xff0c;which \u547d\u4ee4\u4f1a\u544a\u8bc9\u60a8\u8be5\u547d\u4ee4\u4f4d\u4e8e\u54ea\u4e2a\u6587\u4ef6\u7cfb\u7edf\u4e2d\u3002which \u547d\u4ee4\u901a\u5e38\u7528\u4e8e\u786e\u8ba4\u547d\u4ee4\u662f\u5426\u5b58\u5728\u4e8e\u7cfb\u7edf PATH \u4e2d&#xff0c;\u6216\u8005\u7528\u4e8e\u5728\u811a\u672c\u4e2d\u83b7\u53d6\u547d\u4ee4\u7684\u786e\u5207\u8def\u5f84\u3002\u5982\u679c\u60a8\u60f3\u8981\u67e5\u627e\u7684\u547d\u4ee4\u4e0d\u5b58\u5728\u4e8e PATH \u4e2d&#xff0c;which \u547d\u4ee4\u5c06\u4e0d\u4f1a\u8fd4\u56de\u4efb\u4f55\u8f93\u51fa\u3002<\/p>\n<p>\u8bed\u6cd5&#xff1a; which [command]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"74\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104107-6898774312927.png\" width=\"453\" \/><\/p>\n<h3>8\u3001whereis\u547d\u4ee4<\/h3>\n<p>whereis \u547d\u4ee4\u5728 Unix \u548c\u7c7b Unix \u7cfb\u7edf\u4e2d\u7528\u4e8e\u67e5\u627e\u4e8c\u8fdb\u5236\u6587\u4ef6\u3001\u6e90\u4ee3\u7801\u6587\u4ef6\u548c\u624b\u518c\u9875\u7684\u4f4d\u7f6e\u3002\u5b83\u641c\u7d22\u9ed8\u8ba4\u7684\u6587\u4ef6\u7cfb\u7edf\u8def\u5f84\u6765\u786e\u5b9a\u6307\u5b9a\u547d\u4ee4\u7684\u76f8\u5173\u6587\u4ef6\u3002<\/p>\n<p>\u8bed\u6cd5&#xff1a;<span style=\"color:#fe2c24\">whereis [-bms] [-u] [-f] [-h] [-L] [-M] [-S] [-version] [command]<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"196\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104107-689877437e9a9.png\" width=\"426\" \/><\/p>\n<h3>9\u3001diff\u547d\u4ee4<\/h3>\n<p>\u8bed\u6cd5&#xff1a;\u00a0diff [\u9009\u9879] \u6587\u4ef61 \u6587\u4ef62<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"242\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104108-6898774459970.png\" width=\"396\" \/><\/p>\n<p>\u6848\u4f8b&#xff1a;<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"91\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104109-68987745096b3.png\" width=\"647\" \/><\/p>\n<h2>\u4e8c\u3001\u6587\u4ef6\u4e0e\u76ee\u5f55\u5f52\u6863\u538b\u7f29\u547d\u4ee4<\/h2>\n<h3>1\u3001tar\u547d\u4ee4<\/h3>\n<p>\u5f52\u6863\u547d\u4ee4<\/p>\n<p>\u8bed\u6cd5&#xff1a;tar [\u9009\u9879] [\u5f52\u6863\u6587\u4ef6\u540d] [-C] [\u89e3\u538b\u8def\u5f84]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"204\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104109-689877454bc32.png\" width=\"445\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"430\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104109-68987745892ed.png\" width=\"1207\" \/><\/p>\n<p>&#xff08;1&#xff09;\u538b\u7f29<\/p>\n<p><span style=\"color:#ff9900\">tar -jcvf lx.tar.bz2 lx.txt<br \/>\ntar -zcvf lx.tar.gz lx.txt<\/span><\/p>\n<p>&#xff08;2&#xff09;\u89e3\u538b<\/p>\n<p><span style=\"color:#ff9900\">tar xf lx.tar.gz -C \/opt<\/span><\/p>\n<h3>2\u3001zip\u547d\u4ee4<\/h3>\n<p>\u8bed\u6cd5&#xff1a; zip \u538b\u7f29\u540e\u7684\u6587\u4ef6\u540d \u9700\u8981\u538b\u7f29\u7684\u6587\u4ef6<\/p>\n<p>\u89e3\u538b\u7f29\u547d\u4ee4&#xff1a;unzip \u538b\u7f29\u6587\u4ef6\u540d<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"337\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104110-6898774613a9b.png\" width=\"940\" \/><\/p>\n<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"124\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104110-6898774667dfc.png\" width=\"770\" \/><br \/>\n\u00a0 \u00a0\u00a0<\/p>\n<h3>3\u3001gzip\u547d\u4ee4<\/h3>\n<p>\u538b\u7f29\u540e\u6e90\u6587\u4ef6\u6d88\u5931<\/p>\n<p>\u8bed\u6cd5&#xff1a; gzip \u9700\u8981\u538b\u7f29\u7684\u6587\u4ef6<\/p>\n<p>\u89e3\u538b\u7f29\u547d\u4ee4\u00a0&#xff1a;\u89e3\u538b\u540e\u6e90\u6587\u4ef6\u6d88\u5931<\/p>\n<p>gunzip \u538b\u7f29\u6587\u4ef6<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"321\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104110-68987746bd1ec.png\" width=\"855\" \/><\/p>\n<h3>4\u3001bzip2\u547d\u4ee4<\/h3>\n<p>\u538b\u7f29\u540e\u6e90\u6587\u4ef6\u6d88\u5931&#xff0c;\u538b\u7f29\u7387\u6700\u9ad8<\/p>\n<p>\u8bed\u6cd5&#xff1a; bzip2 \u9700\u8981\u538b\u7f29\u7684\u6587\u4ef6<\/p>\n<p>\u89e3\u538b\u7f29\u547d\u4ee4 &#xff1a;\u89e3\u538b\u540e\u6e90\u6587\u4ef6\u6d88\u5931<\/p>\n<p>bunzip2 \u538b\u7f29\u6587\u4ef6<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"184\" src=\"2025-08-1042uieqynbwt.png\" width=\"616\" \/><\/p>\n<h2>\u4e09\u3001\u7edf\u8ba1\u547d\u4ee4<\/h2>\n<h3>1\u3001wc<\/h3>\n<p>\u7edf\u8ba1\u6587\u4ef6\u5185\u5bb9\u7684\u884c\u6570\u3001\u5b57\u7b26\u6570\u3001\u5355\u8bcd\u6570<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"99\" src=\"2025-08-10ywqcdvnhmcl.png\" width=\"289\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"207\" src=\"2025-08-10nxcinwlwyhm.png\" width=\"654\" \/><\/p>\n<h3>2\u3001du<\/h3>\n<p>\u7edf\u8ba1\u6587\u4ef6\u5360\u7528\u78c1\u76d8\u7a7a\u95f4\u7684\u5bb9\u91cf<\/p>\n<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"80\" src=\"2025-08-10yjoz431o55f.png\" width=\"367\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"119\" src=\"2025-08-10tgccz1jojoi.png\" width=\"684\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb767\u6b21\uff0c\u70b9\u8d5e24\u6b21\uff0c\u6536\u85cf15\u6b21\u3002tr\u547d\u4ee4\u662f Unix \u548c\u7c7b Unix \u7cfb\u7edf\u4e2d\u7684\u4e00\u4e2a\u7528\u4e8e\u5b57\u7b26\u8f6c\u6362\u6216\u5220\u9664\u7684\u5b9e\u7528\u7a0b\u5e8f\u3002tr\u547d\u4ee4\u901a\u5e38\u7528\u4e8e\u5904\u7406\u6587\u672c\u6570\u636e\uff0c\u4f8b\u5982\u5220\u9664\u7279\u5b9a\u5b57\u7b26\u3001\u66ff\u6362\u5b57\u7b26\u3001\u8f6c\u6362\u5927\u5c0f\u5199\u7b49\u64cd\u4f5c\u3002\u6848\u4f8b\uff1a1\u3001\uff081\uff09\u5c06\u6587\u672c\u4e2d\u7684\u5927\u5199\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5c0f\u5199\u5b57\u6bcd\uff1a    echo &quot;HELLO&quot; | tr \\&#8217;A-Z\\&#8217; \\&#8217;a-z\\&#8217;\uff082\uff09\u5220\u9664\u6587\u672c\u4e2d\u7684\u7a7a\u683c\uff1aecho &quot;hello world&quot; | tr -d \\&#8217; \\&#8217;\uff083\uff09\u5c06\u6587\u672c\u4e2d\u7684\u7279\u5b9a\u5b57\u7b26\u66ff\u6362\u4e3a\u53e6\u4e00\u4e2a\u5b57\u7b26\uff1aecho &quot;abc-&quot; | tr \\&#8217;a-z\\&#8217; \\&#8217;X-Y\\&#8217;<\/p>\n","protected":false},"author":2,"featured_media":51168,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,43,5051,44],"topic":[],"class_list":["post-51188","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-linux","tag-43","tag-5051","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux\u5c0f\u767d\u4eec\u5fc5\u77e5\u7684\u7cfb\u7edf\u6587\u4ef6\u4e0e\u76ee\u5f55\u5185\u5bb9\u68c0\u7d22\uff08\u4e8c\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\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.wsisp.com\/helps\/51188.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux\u5c0f\u767d\u4eec\u5fc5\u77e5\u7684\u7cfb\u7edf\u6587\u4ef6\u4e0e\u76ee\u5f55\u5185\u5bb9\u68c0\u7d22\uff08\u4e8c\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb767\u6b21\uff0c\u70b9\u8d5e24\u6b21\uff0c\u6536\u85cf15\u6b21\u3002tr\u547d\u4ee4\u662f Unix \u548c\u7c7b Unix \u7cfb\u7edf\u4e2d\u7684\u4e00\u4e2a\u7528\u4e8e\u5b57\u7b26\u8f6c\u6362\u6216\u5220\u9664\u7684\u5b9e\u7528\u7a0b\u5e8f\u3002tr\u547d\u4ee4\u901a\u5e38\u7528\u4e8e\u5904\u7406\u6587\u672c\u6570\u636e\uff0c\u4f8b\u5982\u5220\u9664\u7279\u5b9a\u5b57\u7b26\u3001\u66ff\u6362\u5b57\u7b26\u3001\u8f6c\u6362\u5927\u5c0f\u5199\u7b49\u64cd\u4f5c\u3002\u6848\u4f8b\uff1a1\u3001\uff081\uff09\u5c06\u6587\u672c\u4e2d\u7684\u5927\u5199\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5c0f\u5199\u5b57\u6bcd\uff1a  echo &quot;HELLO&quot; | tr &#039;A-Z&#039; &#039;a-z&#039;\uff082\uff09\u5220\u9664\u6587\u672c\u4e2d\u7684\u7a7a\u683c\uff1aecho &quot;hello world&quot; | tr -d &#039; &#039;\uff083\uff09\u5c06\u6587\u672c\u4e2d\u7684\u7279\u5b9a\u5b57\u7b26\u66ff\u6362\u4e3a\u53e6\u4e00\u4e2a\u5b57\u7b26\uff1aecho &quot;abc-&quot; | tr &#039;a-z&#039; &#039;X-Y&#039;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/51188.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-10T10:41:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104102-6898773ee6b91.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/51188.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/51188.html\",\"name\":\"Linux\u5c0f\u767d\u4eec\u5fc5\u77e5\u7684\u7cfb\u7edf\u6587\u4ef6\u4e0e\u76ee\u5f55\u5185\u5bb9\u68c0\u7d22\uff08\u4e8c\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-10T10:41:12+00:00\",\"dateModified\":\"2025-08-10T10:41:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/51188.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/51188.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/51188.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\u5c0f\u767d\u4eec\u5fc5\u77e5\u7684\u7cfb\u7edf\u6587\u4ef6\u4e0e\u76ee\u5f55\u5185\u5bb9\u68c0\u7d22\uff08\u4e8c\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux\u5c0f\u767d\u4eec\u5fc5\u77e5\u7684\u7cfb\u7edf\u6587\u4ef6\u4e0e\u76ee\u5f55\u5185\u5bb9\u68c0\u7d22\uff08\u4e8c\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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.wsisp.com\/helps\/51188.html","og_locale":"zh_CN","og_type":"article","og_title":"Linux\u5c0f\u767d\u4eec\u5fc5\u77e5\u7684\u7cfb\u7edf\u6587\u4ef6\u4e0e\u76ee\u5f55\u5185\u5bb9\u68c0\u7d22\uff08\u4e8c\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb767\u6b21\uff0c\u70b9\u8d5e24\u6b21\uff0c\u6536\u85cf15\u6b21\u3002tr\u547d\u4ee4\u662f Unix \u548c\u7c7b Unix \u7cfb\u7edf\u4e2d\u7684\u4e00\u4e2a\u7528\u4e8e\u5b57\u7b26\u8f6c\u6362\u6216\u5220\u9664\u7684\u5b9e\u7528\u7a0b\u5e8f\u3002tr\u547d\u4ee4\u901a\u5e38\u7528\u4e8e\u5904\u7406\u6587\u672c\u6570\u636e\uff0c\u4f8b\u5982\u5220\u9664\u7279\u5b9a\u5b57\u7b26\u3001\u66ff\u6362\u5b57\u7b26\u3001\u8f6c\u6362\u5927\u5c0f\u5199\u7b49\u64cd\u4f5c\u3002\u6848\u4f8b\uff1a1\u3001\uff081\uff09\u5c06\u6587\u672c\u4e2d\u7684\u5927\u5199\u5b57\u6bcd\u8f6c\u6362\u4e3a\u5c0f\u5199\u5b57\u6bcd\uff1a  echo &quot;HELLO&quot; | tr 'A-Z' 'a-z'\uff082\uff09\u5220\u9664\u6587\u672c\u4e2d\u7684\u7a7a\u683c\uff1aecho &quot;hello world&quot; | tr -d ' '\uff083\uff09\u5c06\u6587\u672c\u4e2d\u7684\u7279\u5b9a\u5b57\u7b26\u66ff\u6362\u4e3a\u53e6\u4e00\u4e2a\u5b57\u7b26\uff1aecho &quot;abc-&quot; | tr 'a-z' 'X-Y'","og_url":"https:\/\/www.wsisp.com\/helps\/51188.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-10T10:41:12+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810104102-6898773ee6b91.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/51188.html","url":"https:\/\/www.wsisp.com\/helps\/51188.html","name":"Linux\u5c0f\u767d\u4eec\u5fc5\u77e5\u7684\u7cfb\u7edf\u6587\u4ef6\u4e0e\u76ee\u5f55\u5185\u5bb9\u68c0\u7d22\uff08\u4e8c\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-10T10:41:12+00:00","dateModified":"2025-08-10T10:41:12+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/51188.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/51188.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/51188.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Linux\u5c0f\u767d\u4eec\u5fc5\u77e5\u7684\u7cfb\u7edf\u6587\u4ef6\u4e0e\u76ee\u5f55\u5185\u5bb9\u68c0\u7d22\uff08\u4e8c\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/51188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=51188"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/51188\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/51168"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=51188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=51188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=51188"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=51188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}