{"id":42,"date":"2008-01-05T22:36:41","date_gmt":"2008-01-05T14:36:41","guid":{"rendered":"http:\/\/percy.blog.ubuntu.org.cn\/2008\/01\/05\/%e4%b8%ba%e4%ba%86%e7%bc%93%e8%a7%a3%e5%8e%8b%e5%8a%9b%ef%bc%8c%e5%bc%80%e5%a7%8b%e5%ad%a6%e4%b9%a0%e5%90%84%e7%a7%8d%e5%91%bd%e4%bb%a4%ef%bc%8c%e5%b9%b6%e5%b0%9d%e8%af%95%e5%86%99%e4%b8%80%e4%ba%9b\/"},"modified":"2008-01-05T22:36:41","modified_gmt":"2008-01-05T14:36:41","slug":"%e4%b8%ba%e4%ba%86%e7%bc%93%e8%a7%a3%e5%8e%8b%e5%8a%9b%ef%bc%8c%e5%bc%80%e5%a7%8b%e5%ad%a6%e4%b9%a0%e5%90%84%e7%a7%8d%e5%91%bd%e4%bb%a4%ef%bc%8c%e5%b9%b6%e5%b0%9d%e8%af%95%e5%86%99%e4%b8%80%e4%ba%9b","status":"publish","type":"post","link":"https:\/\/pjq.me\/?p=42","title":{"rendered":"\u4e3a\u4e86\u7f13\u89e3\u5b66\u4e60\u538b\u529b\uff0c\u5145\u5206\u5229\u7528free time,\u5f00\u59cb\u5b66\u4e60\u5404\u79cd\u547d\u4ee4\uff0c\u5e76\u5c1d\u8bd5\u5199\u4e00\u4e9b\u5f88\u5c0f\u7684\u811a\u672c"},"content":{"rendered":"<p>1.\u4e00\u4e2a\u5f88\u65e0\u804a\u7684\u811a\u672c\uff0c\u5176\u5b9e\u53ea\u80fd\u7b97\u4e00\u4e2a\u5c0f\u547d\u4ee4<\/p>\n<p>\u7528\u6765\u5c06arp\u6587\u4ef6\u4e2d\u7684IP\u89e3\u6790\u51fa\u6765\uff0c\u5e76\u6392\u5e8f\u663e\u793a\u51fa\u6765<\/p>\n<p>#!\/bin\/sh<br \/>\n#this shell is used to show the arp infomation,and sort the IP<br \/>\necho &#8220;show the arp infomation,IP from 1&#8211;255&#8221;<br \/>\necho &#8220;*****************&#8221;<br \/>\ncat \/proc\/net\/arp | grep -v IP |cut -d &#8221; &#8221; -f1 | cut -d &#8220;.&#8221; -f4| sort -g<br \/>\necho &#8220;*****************&#8221;<\/p>\n<p>2.\u65e0\u804a\u900f\u9876\uff01\uff01~\u5176\u5b9eping\u5c31\u5df2\u7ecf\u53ef\u4ee5\u5b9e\u73b0\u4e86\uff0c\u5475\u5475\uff0c\u53ea\u662f\u5c06\u90a3\u4e00\u5927\u4e32\u4fe1\u606f\u7b80\u7f29\u4e3a\u4e00\u4e2a\u201cOK\u201d<\/p>\n<p>\u7b2c\u4e00\u6b21\u5199\u811a\u672c\uff0c\u4e3b\u8981\u662f\u5b9e\u8df5\uff0c\u5b66\u4e60if  ;then &#8230; fi\u7684\u7528\u6cd5<\/p>\n<p>#!\/bin\/sh<br \/>\n#this shell is used to detect the network is Ok<br \/>\n#and print some useful info.<br \/>\n#ping 10.0.1.1 -c 4 &gt;result.txt<br \/>\necho -n &#8220;please keyin the host:&#8221;<br \/>\nread host<br \/>\n#host=$1<br \/>\nresult=` ping $host -c 4 | grep transmitted  | cut   -d &#8220;,&#8221;  -f3 `<br \/>\necho &#8220;result=$result&#8221;<br \/>\n#if  &#8220;$result&#8221;=&#8221; 0% packet loss&#8221; ; then<br \/>\nif  [  &#8220;$result&#8221; = &#8221; 0% packet loss&#8221;  ] ; then<br \/>\necho  &#8220;the host:$host is OK&#8221;<br \/>\nelse echo &#8220;the host:$host is error&#8221;<br \/>\nfi<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u4e00\u4e2a\u5f88\u65e0\u804a\u7684\u811a\u672c\uff0c\u5176\u5b9e\u53ea\u80fd\u7b97\u4e00\u4e2a\u5c0f\u547d\u4ee4 \u7528\u6765\u5c06arp\u6587\u4ef6\u4e2d\u7684IP\u89e3\u6790\u51fa\u6765\uff0c\u5e76\u6392\u5e8f\u663e\u793a\u51fa\u6765 #!\/bin\/sh #this shell is used to show the arp infomation,and sort the IP echo &#8220;show the arp infomation,IP from 1&#8211;255&#8221; echo &#8220;*****************&#8221; cat \/proc\/net\/arp | grep -v IP |cut -d &#8221; &#8221; -f1 | cut -d &#8220;.&#8221; -f4|<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,5],"tags":[],"class_list":["post-42","post","type-post","status-publish","format-standard","hentry","category-bash","category-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u4e3a\u4e86\u7f13\u89e3\u5b66\u4e60\u538b\u529b\uff0c\u5145\u5206\u5229\u7528free time,\u5f00\u59cb\u5b66\u4e60\u5404\u79cd\u547d\u4ee4\uff0c\u5e76\u5c1d\u8bd5\u5199\u4e00\u4e9b\u5f88\u5c0f\u7684\u811a\u672c - Jianqing&#039;s Blog<\/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:\/\/pjq.me\/?p=42\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4e3a\u4e86\u7f13\u89e3\u5b66\u4e60\u538b\u529b\uff0c\u5145\u5206\u5229\u7528free time,\u5f00\u59cb\u5b66\u4e60\u5404\u79cd\u547d\u4ee4\uff0c\u5e76\u5c1d\u8bd5\u5199\u4e00\u4e9b\u5f88\u5c0f\u7684\u811a\u672c - Jianqing&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"1.\u4e00\u4e2a\u5f88\u65e0\u804a\u7684\u811a\u672c\uff0c\u5176\u5b9e\u53ea\u80fd\u7b97\u4e00\u4e2a\u5c0f\u547d\u4ee4 \u7528\u6765\u5c06arp\u6587\u4ef6\u4e2d\u7684IP\u89e3\u6790\u51fa\u6765\uff0c\u5e76\u6392\u5e8f\u663e\u793a\u51fa\u6765 #!\/bin\/sh #this shell is used to show the arp infomation,and sort the IP echo &#8220;show the arp infomation,IP from 1&#8211;255&#8221; echo &#8220;*****************&#8221; cat \/proc\/net\/arp | grep -v IP |cut -d &#8221; &#8221; -f1 | cut -d &#8220;.&#8221; -f4|\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pjq.me\/?p=42\" \/>\n<meta property=\"og:site_name\" content=\"Jianqing&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2008-01-05T14:36:41+00:00\" \/>\n<meta name=\"author\" content=\"pengjianqing\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"pengjianqing\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/pjq.me\/?p=42#article\",\"isPartOf\":{\"@id\":\"https:\/\/pjq.me\/?p=42\"},\"author\":{\"name\":\"pengjianqing\",\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60\"},\"headline\":\"\u4e3a\u4e86\u7f13\u89e3\u5b66\u4e60\u538b\u529b\uff0c\u5145\u5206\u5229\u7528free time,\u5f00\u59cb\u5b66\u4e60\u5404\u79cd\u547d\u4ee4\uff0c\u5e76\u5c1d\u8bd5\u5199\u4e00\u4e9b\u5f88\u5c0f\u7684\u811a\u672c\",\"datePublished\":\"2008-01-05T14:36:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/pjq.me\/?p=42\"},\"wordCount\":116,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60\"},\"articleSection\":[\"BASH\",\"Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/pjq.me\/?p=42#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/pjq.me\/?p=42\",\"url\":\"https:\/\/pjq.me\/?p=42\",\"name\":\"\u4e3a\u4e86\u7f13\u89e3\u5b66\u4e60\u538b\u529b\uff0c\u5145\u5206\u5229\u7528free time,\u5f00\u59cb\u5b66\u4e60\u5404\u79cd\u547d\u4ee4\uff0c\u5e76\u5c1d\u8bd5\u5199\u4e00\u4e9b\u5f88\u5c0f\u7684\u811a\u672c - Jianqing&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/pjq.me\/#website\"},\"datePublished\":\"2008-01-05T14:36:41+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/pjq.me\/?p=42#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/pjq.me\/?p=42\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/pjq.me\/?p=42#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/pjq.me\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4e3a\u4e86\u7f13\u89e3\u5b66\u4e60\u538b\u529b\uff0c\u5145\u5206\u5229\u7528free time,\u5f00\u59cb\u5b66\u4e60\u5404\u79cd\u547d\u4ee4\uff0c\u5e76\u5c1d\u8bd5\u5199\u4e00\u4e9b\u5f88\u5c0f\u7684\u811a\u672c\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/pjq.me\/#website\",\"url\":\"https:\/\/pjq.me\/\",\"name\":\"Jianqing&#039;s Blog\",\"description\":\"Thoughts and Future\",\"publisher\":{\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/pjq.me\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60\",\"name\":\"pengjianqing\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/pjq.me\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-02-at-6.10.58-PM.png\",\"contentUrl\":\"https:\/\/pjq.me\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-02-at-6.10.58-PM.png\",\"width\":460,\"height\":752,\"caption\":\"pengjianqing\"},\"logo\":{\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/pjq.me\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4e3a\u4e86\u7f13\u89e3\u5b66\u4e60\u538b\u529b\uff0c\u5145\u5206\u5229\u7528free time,\u5f00\u59cb\u5b66\u4e60\u5404\u79cd\u547d\u4ee4\uff0c\u5e76\u5c1d\u8bd5\u5199\u4e00\u4e9b\u5f88\u5c0f\u7684\u811a\u672c - Jianqing&#039;s Blog","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:\/\/pjq.me\/?p=42","og_locale":"en_US","og_type":"article","og_title":"\u4e3a\u4e86\u7f13\u89e3\u5b66\u4e60\u538b\u529b\uff0c\u5145\u5206\u5229\u7528free time,\u5f00\u59cb\u5b66\u4e60\u5404\u79cd\u547d\u4ee4\uff0c\u5e76\u5c1d\u8bd5\u5199\u4e00\u4e9b\u5f88\u5c0f\u7684\u811a\u672c - Jianqing&#039;s Blog","og_description":"1.\u4e00\u4e2a\u5f88\u65e0\u804a\u7684\u811a\u672c\uff0c\u5176\u5b9e\u53ea\u80fd\u7b97\u4e00\u4e2a\u5c0f\u547d\u4ee4 \u7528\u6765\u5c06arp\u6587\u4ef6\u4e2d\u7684IP\u89e3\u6790\u51fa\u6765\uff0c\u5e76\u6392\u5e8f\u663e\u793a\u51fa\u6765 #!\/bin\/sh #this shell is used to show the arp infomation,and sort the IP echo &#8220;show the arp infomation,IP from 1&#8211;255&#8221; echo &#8220;*****************&#8221; cat \/proc\/net\/arp | grep -v IP |cut -d &#8221; &#8221; -f1 | cut -d &#8220;.&#8221; -f4|","og_url":"https:\/\/pjq.me\/?p=42","og_site_name":"Jianqing&#039;s Blog","article_published_time":"2008-01-05T14:36:41+00:00","author":"pengjianqing","twitter_card":"summary_large_image","twitter_misc":{"Written by":"pengjianqing","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pjq.me\/?p=42#article","isPartOf":{"@id":"https:\/\/pjq.me\/?p=42"},"author":{"name":"pengjianqing","@id":"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60"},"headline":"\u4e3a\u4e86\u7f13\u89e3\u5b66\u4e60\u538b\u529b\uff0c\u5145\u5206\u5229\u7528free time,\u5f00\u59cb\u5b66\u4e60\u5404\u79cd\u547d\u4ee4\uff0c\u5e76\u5c1d\u8bd5\u5199\u4e00\u4e9b\u5f88\u5c0f\u7684\u811a\u672c","datePublished":"2008-01-05T14:36:41+00:00","mainEntityOfPage":{"@id":"https:\/\/pjq.me\/?p=42"},"wordCount":116,"commentCount":1,"publisher":{"@id":"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60"},"articleSection":["BASH","Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pjq.me\/?p=42#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pjq.me\/?p=42","url":"https:\/\/pjq.me\/?p=42","name":"\u4e3a\u4e86\u7f13\u89e3\u5b66\u4e60\u538b\u529b\uff0c\u5145\u5206\u5229\u7528free time,\u5f00\u59cb\u5b66\u4e60\u5404\u79cd\u547d\u4ee4\uff0c\u5e76\u5c1d\u8bd5\u5199\u4e00\u4e9b\u5f88\u5c0f\u7684\u811a\u672c - Jianqing&#039;s Blog","isPartOf":{"@id":"https:\/\/pjq.me\/#website"},"datePublished":"2008-01-05T14:36:41+00:00","breadcrumb":{"@id":"https:\/\/pjq.me\/?p=42#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pjq.me\/?p=42"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pjq.me\/?p=42#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pjq.me\/"},{"@type":"ListItem","position":2,"name":"\u4e3a\u4e86\u7f13\u89e3\u5b66\u4e60\u538b\u529b\uff0c\u5145\u5206\u5229\u7528free time,\u5f00\u59cb\u5b66\u4e60\u5404\u79cd\u547d\u4ee4\uff0c\u5e76\u5c1d\u8bd5\u5199\u4e00\u4e9b\u5f88\u5c0f\u7684\u811a\u672c"}]},{"@type":"WebSite","@id":"https:\/\/pjq.me\/#website","url":"https:\/\/pjq.me\/","name":"Jianqing&#039;s Blog","description":"Thoughts and Future","publisher":{"@id":"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pjq.me\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60","name":"pengjianqing","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pjq.me\/#\/schema\/person\/image\/","url":"https:\/\/pjq.me\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-02-at-6.10.58-PM.png","contentUrl":"https:\/\/pjq.me\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-02-at-6.10.58-PM.png","width":460,"height":752,"caption":"pengjianqing"},"logo":{"@id":"https:\/\/pjq.me\/#\/schema\/person\/image\/"},"url":"https:\/\/pjq.me\/?author=1"}]}},"views":3061,"_links":{"self":[{"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/posts\/42","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pjq.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=42"}],"version-history":[{"count":0,"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/posts\/42\/revisions"}],"wp:attachment":[{"href":"https:\/\/pjq.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pjq.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pjq.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}