{"id":52156,"date":"2024-12-03T13:54:26","date_gmt":"2024-12-03T05:54:26","guid":{"rendered":"https:\/\/fwq.ai\/blog\/52156\/"},"modified":"2024-12-03T13:54:26","modified_gmt":"2024-12-03T05:54:26","slug":"linux-wc%e5%91%bd%e4%bb%a4%e6%80%8e%e4%b9%88%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/52156\/","title":{"rendered":"Linux wc\u547d\u4ee4\u600e\u4e48\u4f7f\u7528"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>Linux wc\u547d\u4ee4\u600e\u4e48\u4f7f\u7528<\/h1>\n<p>\u4ece\u73b0\u5728\u5f00\u59cb\uff0c\u52aa\u529b\u5b66\u4e60\u5427\uff01\u672c\u6587<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300aLinux wc\u547d\u4ee4\u600e\u4e48\u4f7f\u7528\u300b<\/span>\u4e3b\u8981\u8bb2\u89e3\u4e86<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\u76f8\u5173\u77e5\u8bc6\u70b9\uff0c\u6211\u4f1a\u5728\u7c73\u4e91\u4e2d\u6301\u7eed\u66f4\u65b0\u76f8\u5173\u7684\u7cfb\u5217\u6587\u7ae0\uff0c\u6b22\u8fce\u5927\u5bb6\u5173\u6ce8\u5e76\u79ef\u6781\u7559\u8a00\u5efa\u8bae\u3002\u4e0b\u9762\u5c31\u5148\u4e00\u8d77\u6765\u770b\u4e00\u4e0b\u672c\u7bc7\u6b63\u6587\u5185\u5bb9\u5427\uff0c\u5e0c\u671b\u80fd\u5e2e\u5230\u4f60\uff01<\/p>\n<p>Linux wc\u547d\u4ee4\u7528\u4e8e\u8ba1\u7b97\u5b57\u6570\u3002<\/p>\n<p>\u5229\u7528wc\u6307\u4ee4\u6211\u4eec\u53ef\u4ee5\u8ba1\u7b97\u6587\u4ef6\u7684Byte\u6570\u3001\u5b57\u6570\u3001\u6216\u662f\u5217\u6570\uff0c\u82e5\u4e0d\u6307\u5b9a\u6587\u4ef6\u540d\u79f0\u3001\u6216\u662f\u6240\u7ed9\u4e88\u7684\u6587\u4ef6\u540d\u4e3a&#8221;-&#8220;\uff0c\u5219wc\u6307\u4ee4\u4f1a\u4ece\u6807\u51c6\u8f93\u5165\u8bbe\u5907\u8bfb\u53d6\u6570\u636e\u3002<\/p>\n<p><strong>\u8bed\u6cd5\uff1a<\/strong><\/p>\n<pre>wc<\/pre>\n<p><strong>\u53c2\u6570\uff1a<\/strong><\/p>\n<p>-c\u6216&#8211;bytes\u6216&#8211;chars \u53ea\u663e\u793aBytes\u6570\u3002<\/p>\n<p>-l\u6216&#8211;lines \u663e\u793a\u884c\u6570\u3002<\/p>\n<p>-w\u6216&#8211;words \u53ea\u663e\u793a\u5b57\u6570\u3002<\/p>\n<p>&#8211;help \u5728\u7ebf\u5e2e\u52a9\u3002<\/p>\n<p>&#8211;version \u663e\u793a\u7248\u672c\u4fe1\u606f\u3002<\/p>\n<p><strong>\u5b9e\u4f8b\uff1a<\/strong><\/p>\n<p>\u5728\u9ed8\u8ba4\u7684\u60c5\u51b5\u4e0b\uff0cwc\u5c06\u8ba1\u7b97\u6307\u5b9a\u6587\u4ef6\u7684\u884c\u6570\u3001\u5b57\u6570\uff0c\u4ee5\u53ca\u5b57\u8282\u6570\u3002\u4f7f\u7528\u7684\u547d\u4ee4\u4e3a\uff1a<\/p>\n<pre>wc<\/pre>\n<p>\u5148\u67e5\u770btestfile\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u53ef\u4ee5\u770b\u5230\uff1a<\/p>\n<pre>$&nbsp;cat&nbsp;testfile&nbsp;&nbsp;\nLinux&nbsp;networks&nbsp;are&nbsp;becoming&nbsp;more&nbsp;and&nbsp;more&nbsp;common,&nbsp;but&nbsp;scurity&nbsp;is&nbsp;often&nbsp;an&nbsp;overlooked&nbsp;&nbsp;\nissue.&nbsp;Unfortunately,&nbsp;in&nbsp;today\u2019s&nbsp;environment&nbsp;all&nbsp;networks&nbsp;are&nbsp;potential&nbsp;hacker&nbsp;targets,&nbsp;&nbsp;\nfro0m&nbsp;tp-secret&nbsp;military&nbsp;research&nbsp;networks&nbsp;to&nbsp;small&nbsp;home&nbsp;LANs.&nbsp;&nbsp;\nLinux&nbsp;Network&nbsp;Securty&nbsp;focuses&nbsp;on&nbsp;securing&nbsp;Linux&nbsp;in&nbsp;a&nbsp;networked&nbsp;environment,&nbsp;where&nbsp;the&nbsp;&nbsp;\nsecurity&nbsp;of&nbsp;the&nbsp;entire&nbsp;network&nbsp;needs&nbsp;to&nbsp;be&nbsp;considered&nbsp;rather&nbsp;than&nbsp;just&nbsp;isolated&nbsp;machines.&nbsp;&nbsp;\nIt&nbsp;uses&nbsp;a&nbsp;mix&nbsp;of&nbsp;theory&nbsp;and&nbsp;practicl&nbsp;techniques&nbsp;to&nbsp;teach&nbsp;administrators&nbsp;how&nbsp;to&nbsp;install&nbsp;and&nbsp;&nbsp;\nuse&nbsp;security&nbsp;applications,&nbsp;as&nbsp;well&nbsp;as&nbsp;how&nbsp;the&nbsp;applcations&nbsp;work&nbsp;and&nbsp;why&nbsp;they&nbsp;are&nbsp;necesary.<\/pre>\n<p>\u4f7f\u7528 wc\u7edf\u8ba1\uff0c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<pre>$&nbsp;wc&nbsp;testfile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;testfile\u6587\u4ef6\u7684\u7edf\u8ba1\u4fe1\u606f&nbsp;&nbsp;\n3&nbsp;92&nbsp;598<\/pre>\n<p>\u5176\u4e2d\uff0c3 \u4e2a\u6570\u5b57\u5206\u522b\u8868\u793atestfile\u6587\u4ef6\u7684\u884c\u6570\u3001\u5355\u8bcd\u6570\uff0c\u4ee5\u53ca\u8be5\u6587\u4ef6\u7684\u5b57\u8282\u6570\u3002<\/p>\n<p>\u5982\u679c\u60f3\u540c\u65f6\u7edf\u8ba1\u591a\u4e2a\u6587\u4ef6\u7684\u4fe1\u606f\uff0c\u4f8b\u5982\u540c\u65f6\u7edf\u8ba1testfile\u3001testfile_1\u3001testfile_2\uff0c\u53ef\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>wc<\/pre>\n<p>\u8f93\u51fa\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<pre>$&nbsp;wc&nbsp;testfile&nbsp;testfile_1&nbsp;testfile_2&nbsp;&nbsp;#\u7edf\u8ba1\u4e09\u4e2a\u6587\u4ef6\u7684\u4fe1\u606f&nbsp;&nbsp;\n3&nbsp;92&nbsp;598&nbsp;testfile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\u7b2c\u4e00\u4e2a\u6587\u4ef6\u884c\u6570\u4e3a3\u3001\u5355\u8bcd\u657092\u3001\u5b57\u8282\u6570598&nbsp;&nbsp;\n9&nbsp;18&nbsp;78&nbsp;testfile_1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\u7b2c\u4e8c\u4e2a\u6587\u4ef6\u7684\u884c\u6570\u4e3a9\u3001\u5355\u8bcd\u657018\u3001\u5b57\u8282\u657078&nbsp;&nbsp;\n3&nbsp;6&nbsp;32&nbsp;testfile_2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\u7b2c\u4e09\u4e2a\u6587\u4ef6\u7684\u884c\u6570\u4e3a3\u3001\u5355\u8bcd\u65706\u3001\u5b57\u8282\u657032&nbsp;&nbsp;\n15&nbsp;116&nbsp;708<\/pre>\n<p>\u4eca\u5929\u5173\u4e8e\u300aLinux wc\u547d\u4ee4\u600e\u4e48\u4f7f\u7528\u300b\u7684\u5185\u5bb9\u5c31\u4ecb\u7ecd\u5230\u8fd9\u91cc\u4e86\uff0c\u662f\u4e0d\u662f\u5b66\u8d77\u6765\u4e00\u76ee\u4e86\u7136\uff01\u60f3\u8981\u4e86\u89e3\u66f4\u591a\u5173\u4e8eLinux\u7684\u5185\u5bb9\u8bf7\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux wc\u547d\u4ee4\u600e\u4e48\u4f7f\u7528 \u4ece\u73b0\u5728\u5f00\u59cb\uff0c\u52aa\u529b\u5b66\u4e60\u5427\uff01\u672c\u6587\u300aLinux wc\u547d\u4ee4\u600e\u4e48\u4f7f\u7528\u300b\u4e3b\u8981\u8bb2\u89e3\u4e86\u7b49\u7b49\u76f8\u5173\u77e5\u8bc6\u70b9\uff0c\u6211\u4f1a\u5728\u7c73\u4e91\u4e2d\u6301\u7eed\u66f4\u65b0\u76f8\u5173\u7684\u7cfb\u5217\u6587\u7ae0\uff0c\u6b22\u8fce\u5927\u5bb6\u5173\u6ce8\u5e76\u79ef\u6781\u7559\u8a00\u5efa\u8bae\u3002\u4e0b\u9762\u5c31\u5148\u4e00\u8d77\u6765\u770b\u4e00\u4e0b\u672c\u7bc7\u6b63\u6587\u5185\u5bb9\u5427\uff0c\u5e0c\u671b\u80fd\u5e2e\u5230\u4f60\uff01 Linux wc\u547d\u4ee4\u7528\u4e8e\u8ba1\u7b97\u5b57\u6570\u3002 \u5229\u7528wc\u6307\u4ee4\u6211\u4eec\u53ef\u4ee5\u8ba1\u7b97\u6587\u4ef6\u7684Byte\u6570\u3001\u5b57\u6570\u3001\u6216\u662f\u5217\u6570\uff0c\u82e5\u4e0d\u6307\u5b9a\u6587\u4ef6\u540d\u79f0\u3001\u6216\u662f\u6240\u7ed9\u4e88\u7684\u6587\u4ef6\u540d\u4e3a&#8221;-&#8220;\uff0c\u5219wc\u6307\u4ee4\u4f1a\u4ece\u6807\u51c6\u8f93\u5165\u8bbe\u5907\u8bfb\u53d6\u6570\u636e\u3002 \u8bed\u6cd5\uff1a wc \u53c2\u6570\uff1a -c\u6216&#8211;bytes\u6216&#8211;chars \u53ea\u663e\u793aBytes\u6570\u3002 -l\u6216&#8211;lines \u663e\u793a\u884c\u6570\u3002 -w\u6216&#8211;words \u53ea\u663e\u793a\u5b57\u6570\u3002 &#8211;help \u5728\u7ebf\u5e2e\u52a9\u3002 &#8211;version \u663e\u793a\u7248\u672c\u4fe1\u606f\u3002 \u5b9e\u4f8b\uff1a \u5728\u9ed8\u8ba4\u7684\u60c5\u51b5\u4e0b\uff0cwc\u5c06\u8ba1\u7b97\u6307\u5b9a\u6587\u4ef6\u7684\u884c\u6570\u3001\u5b57\u6570\uff0c\u4ee5\u53ca\u5b57\u8282\u6570\u3002\u4f7f\u7528\u7684\u547d\u4ee4\u4e3a\uff1a wc \u5148\u67e5\u770btestfile\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u53ef\u4ee5\u770b\u5230\uff1a $&nbsp;cat&nbsp;testfile&nbsp;&nbsp; Linux&nbsp;networks&nbsp;are&nbsp;becoming&nbsp;more&nbsp;and&nbsp;more&nbsp;common,&nbsp;but&nbsp;scurity&nbsp;is&nbsp;often&nbsp;an&nbsp;overlooked&nbsp;&nbsp; issue.&nbsp;Unfortunately,&nbsp;in&nbsp;today\u2019s&nbsp;environment&nbsp;all&nbsp;networks&nbsp;are&nbsp;potential&nbsp;hacker&nbsp;targets,&nbsp;&nbsp; fro0m&nbsp;tp-secret&nbsp;military&nbsp;research&nbsp;networks&nbsp;to&nbsp;small&nbsp;home&nbsp;LANs.&nbsp;&nbsp; Linux&nbsp;Network&nbsp;Securty&nbsp;focuses&nbsp;on&nbsp;securing&nbsp;Linux&nbsp;in&nbsp;a&nbsp;networked&nbsp;environment,&nbsp;where&nbsp;the&nbsp;&nbsp; security&nbsp;of&nbsp;the&nbsp;entire&nbsp;network&nbsp;needs&nbsp;to&nbsp;be&nbsp;considered&nbsp;rather&nbsp;than&nbsp;just&nbsp;isolated&nbsp;machines.&nbsp;&nbsp; It&nbsp;uses&nbsp;a&nbsp;mix&nbsp;of&nbsp;theory&nbsp;and&nbsp;practicl&nbsp;techniques&nbsp;to&nbsp;teach&nbsp;administrators&nbsp;how&nbsp;to&nbsp;install&nbsp;and&nbsp;&nbsp; use&nbsp;security&nbsp;applications,&nbsp;as&nbsp;well&nbsp;as&nbsp;how&nbsp;the&nbsp;applcations&nbsp;work&nbsp;and&nbsp;why&nbsp;they&nbsp;are&nbsp;necesary. \u4f7f\u7528 wc\u7edf\u8ba1\uff0c\u7ed3\u679c\u5982\u4e0b\uff1a $&nbsp;wc&nbsp;testfile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;testfile\u6587\u4ef6\u7684\u7edf\u8ba1\u4fe1\u606f&nbsp;&nbsp; 3&nbsp;92&nbsp;598 \u5176\u4e2d\uff0c3 \u4e2a\u6570\u5b57\u5206\u522b\u8868\u793atestfile\u6587\u4ef6\u7684\u884c\u6570\u3001\u5355\u8bcd\u6570\uff0c\u4ee5\u53ca\u8be5\u6587\u4ef6\u7684\u5b57\u8282\u6570\u3002 \u5982\u679c\u60f3\u540c\u65f6\u7edf\u8ba1\u591a\u4e2a\u6587\u4ef6\u7684\u4fe1\u606f\uff0c\u4f8b\u5982\u540c\u65f6\u7edf\u8ba1testfile\u3001testfile_1\u3001testfile_2\uff0c\u53ef\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\uff1a wc \u8f93\u51fa\u7ed3\u679c\u5982\u4e0b\uff1a $&nbsp;wc&nbsp;testfile&nbsp;testfile_1&nbsp;testfile_2&nbsp;&nbsp;#\u7edf\u8ba1\u4e09\u4e2a\u6587\u4ef6\u7684\u4fe1\u606f&nbsp;&nbsp; 3&nbsp;92&nbsp;598&nbsp;testfile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\u7b2c\u4e00\u4e2a\u6587\u4ef6\u884c\u6570\u4e3a3\u3001\u5355\u8bcd\u657092\u3001\u5b57\u8282\u6570598&nbsp;&nbsp; 9&nbsp;18&nbsp;78&nbsp;testfile_1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\u7b2c\u4e8c\u4e2a\u6587\u4ef6\u7684\u884c\u6570\u4e3a9\u3001\u5355\u8bcd\u657018\u3001\u5b57\u8282\u657078&nbsp;&nbsp; 3&nbsp;6&nbsp;32&nbsp;testfile_2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\u7b2c\u4e09\u4e2a\u6587\u4ef6\u7684\u884c\u6570\u4e3a3\u3001\u5355\u8bcd\u65706\u3001\u5b57\u8282\u657032&nbsp;&nbsp; 15&nbsp;116&nbsp;708 \u4eca\u5929\u5173\u4e8e\u300aLinux wc\u547d\u4ee4\u600e\u4e48\u4f7f\u7528\u300b\u7684\u5185\u5bb9\u5c31\u4ecb\u7ecd\u5230\u8fd9\u91cc\u4e86\uff0c\u662f\u4e0d\u662f\u5b66\u8d77\u6765\u4e00\u76ee\u4e86\u7136\uff01\u60f3\u8981\u4e86\u89e3\u66f4\u591a\u5173\u4e8eLinux\u7684\u5185\u5bb9\u8bf7\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-52156","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=52156"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52156\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=52156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=52156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=52156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}