{"id":5465,"date":"2021-01-05T22:32:12","date_gmt":"2021-01-05T14:32:12","guid":{"rendered":"http:\/\/39.97.231.10\/?p=5465"},"modified":"2021-01-05T22:32:12","modified_gmt":"2021-01-05T14:32:12","slug":"linux-%e6%9f%a5%e6%89%be%e5%bd%93%e5%89%8d%e7%9b%ae%e5%bd%95%e4%b8%8b-%e5%8c%85%e5%90%ab%e7%89%b9%e5%ae%9a%e5%ad%97%e7%ac%a6%e4%b8%b2-%e7%9a%84%e6%89%80%e6%9c%89%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"http:\/\/www.weijing.co\/?p=5465","title":{"rendered":"Linux \u67e5\u627e\u5f53\u524d\u76ee\u5f55\u4e0b \u5305\u542b\u7279\u5b9a\u5b57\u7b26\u4e32 \u7684\u6240\u6709\u6587\u4ef6"},"content":{"rendered":"<div class=\\\"postBody\\\">\n<div id=\\\"cnblogs_post_body\\\" class=\\\"blogpost-body\\\">\n\u4f7f\u7528 Linux \u7ecf\u5e38\u4f1a\u9047\u5230\u8fd9\u79cd\u60c5\u51b5\uff1a\u53ea\u77e5\u9053\u6587\u4ef6\u4e2d\u5305\u542b\u67d0\u4e9b\u7279\u5b9a\u7684\u5b57\u7b26\u4e32\uff0c\u4f46\u662f\u4e0d\u77e5\u9053\u5177\u4f53\u7684\u6587\u4ef6\u540d\u3002\u9700\u8981\u6839\u636e\u201c\u7279\u5b9a\u7684\u5b57\u7b26\u4e32\u201d\u53cd\u5411\u67e5\u627e\u6587\u4ef6\u3002<br \/>\n<strong>\u793a\u4f8b<\/strong>\uff08\u8def\u5f84\u6587\u4ef6\u5982\u4e0b\uff09\uff1a<br \/>\n.\/miracle\/luna\/a.txt<br \/>\na.txt \u6587\u4ef6\u4e2d\u7684\u5185\u5bb9\u5982\u4e0b<\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre>Hello, World!<\/pre>\n<\/div>\n<p><strong>\u67e5\u627e\u5f53\u524d\u76ee\u5f55\u4e0b\uff0c\u5305\u542b\u201cHello\u201d\u5b57\u7b26\u4e32\u7684\u6240\u6709\u6587\u4ef6<\/strong><br \/>\n<strong>\u3010\u65b9\u5f0f1\u3011<\/strong>\uff08\u5176\u4e2d\uff0c<strong>r<\/strong>\u00a0\u8868\u793a<strong>\u9012\u5f52<\/strong>\uff0c\u00a0<strong>n\u00a0<\/strong>\u8868\u793a\u67e5\u8be2\u7ed3\u679c\u663e\u793a<strong>\u884c\u53f7<\/strong>\uff09\uff1a<\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre>grep -rn \\\"Hello\\\" .\/<\/pre>\n<\/div>\n<p><strong>\u3010\u65b9\u5f0f2\u3011<\/strong><\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre>find .\/ -name \\\"*.*\\\" | xargs grep  \\\"Hello\\\"<\/pre>\n<\/div>\n<p><strong>\u3010\u65b9\u5f0f3\u3011<\/strong>\uff08<strong>-l<\/strong>\u00a0\u8868\u793a\u53ea\u663e\u793a\u6587\u4ef6\u540d\uff09<\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre>find . | xargs grep -ri \\\"Hello\\\"<\/pre>\n<\/div>\n<p>\u6216<\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre>find . | xargs grep -ri \\\"Hello\\\" -l<\/pre>\n<\/div>\n<p><strong>\u3010\u65b9\u5f0f4 \u3011\uff08\u63a8\u8350\uff0c\u66f4\u4e3a\u901a\u7528\uff01\uff09<\/strong><br \/>\n\u5982\u679c\u4e0d\u77e5\u9053\u6587\u4ef6\u6240\u5728\u7684\u5927\u81f4\u76ee\u5f55\uff0c\u77e5\u9053\u6587\u4ef6\u7684\u7c7b\u578b\uff08\u4f8b\u5982\u6587\u672c\u7c7b\u578b txt\uff09\uff0c\u53ef\u4ee5\u5728root\u6839\u76ee\u5f55 \/ \u4e0b\u6839\u636e\u7279\u5b9a\u5b57\u7b26\u4e32\u8fdb\u884c\u67e5\u627e\uff1a<\/p>\n<div class=\\\"cnblogs_code\\\">\n<pre>find \/ -type f -name \\\"*.txt\\\" | xargs grep \\\"Hello\\\"<\/pre>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528 Linux \u7ecf\u5e38\u4f1a\u9047\u5230\u8fd9\u79cd\u60c5\u51b5\uff1a\u53ea\u77e5\u9053\u6587\u4ef6\u4e2d\u5305\u542b\u67d0\u4e9b\u7279\u5b9a\u7684\u5b57\u7b26\u4e32\uff0c\u4f46\u662f\u4e0d\u77e5\u9053\u5177\u4f53\u7684\u6587\u4ef6\u540d\u3002\u9700\u8981\u6839\u636e\u201c\u7279\u5b9a &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/www.weijing.co\/?p=5465\"> <span class=\"screen-reader-text\">Linux \u67e5\u627e\u5f53\u524d\u76ee\u5f55\u4e0b \u5305\u542b\u7279\u5b9a\u5b57\u7b26\u4e32 \u7684\u6240\u6709\u6587\u4ef6<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":""},"categories":[102,124],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"mailpoet_newsletter_max":false,"woocommerce_thumbnail":false,"woocommerce_single":false,"woocommerce_gallery_thumbnail":false,"shop_catalog":false,"shop_single":false,"shop_thumbnail":false},"uagb_author_info":{"display_name":"weijing","author_link":"http:\/\/www.weijing.co\/?author=4"},"uagb_comment_info":0,"uagb_excerpt":"\u4f7f\u7528 Linux \u7ecf\u5e38\u4f1a\u9047\u5230\u8fd9\u79cd\u60c5\u51b5\uff1a\u53ea\u77e5\u9053\u6587\u4ef6\u4e2d\u5305\u542b\u67d0\u4e9b\u7279\u5b9a\u7684\u5b57\u7b26\u4e32\uff0c\u4f46\u662f\u4e0d\u77e5\u9053\u5177\u4f53\u7684\u6587\u4ef6\u540d\u3002\u9700\u8981\u6839\u636e\u201c\u7279\u5b9a&hellip;","_links":{"self":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/5465"}],"collection":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5465"}],"version-history":[{"count":0,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/5465\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5465"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}