{"id":9409,"date":"2023-02-11T09:36:12","date_gmt":"2023-02-11T00:36:12","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=9409"},"modified":"2023-09-08T06:37:32","modified_gmt":"2023-09-07T21:37:32","slug":"linux%e3%81%a7%e3%83%86%e3%82%ad%e3%82%b9%e3%83%88%e3%81%ae%e6%a4%9c%e7%b4%a2%e3%81%a7%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%ef%bc%8f%e6%8b%a1%e5%bc%b5%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%e3%82%92","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/9409","title":{"rendered":"Linux\u3067\u30c6\u30ad\u30b9\u30c8\u306e\u691c\u7d22\u3067\u6b63\u898f\u8868\u73fe\uff0f\u62e1\u5f35\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u7528\u3059\u308b\uff01\uff08grep -G\uff0fgrep -E\uff09"},"content":{"rendered":"<p>Linux\u3067\u30c6\u30ad\u30b9\u30c8\u306e\u691c\u7d22\u3067\u6b63\u898f\u8868\u73fe\uff0f\u62e1\u5f35\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>\u57fa\u672c\u306e\u6b63\u898f\u8868\u73fe\u306e\u4ee3\u8868\u4f8b\u3092\u8a66\u3057\u3066\u307f\u308b\uff01<\/h2>\n<p>\u57fa\u672c\u306e\u6b63\u898f\u8868\u73fe\u306e\u4ee3\u8868\u4f8b\u3092\u3001\u300cgrep -G\u300d\u30b3\u30de\u30f3\u30c9\u3067\u8a66\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<h3>\u57fa\u672c\u306e\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u7528\u3059\u308b\uff01\uff08\u884c\u982d\uff1a^\uff09<\/h3>\n<p>\u884c\u982d\u306f\u3001\u300c^\u300d\u3067\u8868\u73fe\u3057\u307e\u3059\uff01<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ grep -G ^root \/etc\/passwd\r\nroot:x:0:0:root:\/root:\/bin\/bash\r\n<\/pre>\n<h3>\u57fa\u672c\u306e\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u7528\u3059\u308b\uff01\uff08\u884c\u672b\uff1a$\uff09<\/h3>\n<p>\u884c\u672b\u306f\u3001\u300c$\u300d\u3067\u8868\u73fe\u3057\u307e\u3059\uff01<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ grep -G t$ \/etc\/passwd\r\nhalt:x:7:0:halt:\/sbin:\/sbin\/halt\r\n<\/pre>\n<h3>\u57fa\u672c\u306e\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u7528\u3059\u308b\uff01\uff08\u3044\u305a\u308c\u304b\u306e\u6587\u5b57\uff1a[...]\uff09<\/h3>\n<p>\u3044\u305a\u308c\u304b\u306e\u6587\u5b57\u306f\u3001[...]\u3067\u56f2\u307f\u307e\u3059\u3002\u56f2\u307e\u308c\u305f\u6587\u5b57\u306e\u3069\u308c\u304b1\u6587\u5b57\u306b\u30de\u30c3\u30c1\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u4f8b\u3067\u306f\u3001[r]oot\u3068[h]oot\u304c\u30de\u30c3\u30c1\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ grep -G &#x5B;a-zA-Z0-9]oot \/etc\/passwd\r\nroot:x:0:0:root:\/root:\/bin\/bash\r\noperator:x:11:0:operator:\/root:\/sbin\/nologin\r\nsetroubleshoot:x:991:984::\/var\/lib\/setroubleshoot:\/sbin\/nologin\r\n<\/pre>\n<h3>\u57fa\u672c\u306e\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u7528\u3059\u308b\uff01\uff08\u76f4\u524d\u306e\u6587\u5b57\u304c0\u56de\u4ee5\u4e0a\uff1a*\uff09<\/h3>\n<p>\u7279\u5b9a\u306e\u6587\u5b57\u304c0\u56de\u4ee5\u4e0a\u306f\u3001\u300c*\u300d\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u300c\\\u300d\u3067\u30a8\u30b9\u30b1\u30fc\u30d7\u3057\u305f\u307b\u3046\u304c\u78ba\u5b9f\u3067\u3059\u3002\u672c\u5f53\u306f\u30011\u6587\u5b57\u4ee5\u4e0a\u3067\u6307\u5b9a\u3057\u305f\u3044\u3053\u3068\u304c\u591a\u304f\u3001\u5c11\u3057\u4f7f\u3044\u3065\u3089\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ grep -G usradm0\\* \/etc\/passwd\r\nusradmin:x:1000:1000::\/home\/usradmin:\/bin\/bash\r\nusradm01:x:1001:1001::\/home\/usradm01:\/bin\/bash\r\nusradm02:x:1002:1002::\/home\/usradm02:\/bin\/bash\r\n<\/pre>\n<h2>\u62e1\u5f35\u6b63\u898f\u8868\u73fe\u306e\u4ee3\u8868\u4f8b\u3092\u8a66\u3057\u3066\u307f\u308b\uff01<\/h2>\n<p>\u62e1\u5f35\u6b63\u898f\u8868\u73fe\u306e\u4ee3\u8868\u4f8b\u3092\u3001\u300cgrep -E\u300d\u30b3\u30de\u30f3\u30c9\u3067\u8a66\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<h3>\u62e1\u5f35\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u7528\u3059\u308b\uff01\uff08\u76f4\u524d\u306e\u6587\u5b57\u304c0\u56de\u304b1\u56de\u4ee5\u4e0a\uff1a+\uff09<\/h3>\n<p>\u7279\u5b9a\u306e\u6587\u5b57\u304c0\u56de\u304c1\u56de\u306f\u3001\u300c?\u300d\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ grep -E usradm0? \/etc\/passwd\r\nusradmin:x:1000:1000::\/home\/usradmin:\/bin\/bash\r\nusradm01:x:1001:1001::\/home\/usradm01:\/bin\/bash\r\nusradm02:x:1002:1002::\/home\/usradm02:\/bin\/bash\r\n<\/pre>\n<h3>\u62e1\u5f35\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u7528\u3059\u308b\uff01\uff08\u76f4\u524d\u306e\u6587\u5b57\u304c1\u56de\u4ee5\u4e0a\uff1a+\uff09<\/h3>\n<p>\u7279\u5b9a\u306e\u6587\u5b57\u304c1\u56de\u4ee5\u4e0a\u306f\u3001\u300c+\u300d\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ grep -E usradm0+ \/etc\/passwd\r\nusradm01:x:1001:1001::\/home\/usradm01:\/bin\/bash\r\nusradm02:x:1002:1002::\/home\/usradm02:\/bin\/bash\r\nusradm02:x:1002:1002::\/home\/usradm02:\/bin\/bash\r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>\u6b63\u898f\u8868\u73fe\u306f\u3001\u4eba\u9593\u306b\u3068\u3063\u3066\u306f\u308f\u304b\u308a\u306b\u304f\u3044\u3068\u3053\u308d\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306b\u3068\u3063\u3066\u306f\u51e6\u7406\u3057\u3084\u3059\u3044\u8868\u73fe\u5f62\u5f0f\u3067\u3059\u3002\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u3044\u3053\u306a\u305b\u3070\u3001\u8907\u96d1\u306a\u6587\u5b57\u5217\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u307e\u3068\u3081\u3066\u77ed\u3044\u8868\u73fe\u3067\u30de\u30c3\u30c1\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/9227\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u3067\u30c6\u30ad\u30b9\u30c8\u304a\u3088\u3073\u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb\u3092\u51e6\u7406\u3059\u308b\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2021\/02\/fi_linux_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u3067\u30c6\u30ad\u30b9\u30c8\u304a\u3088\u3073\u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb\u3092\u51e6\u7406\u3059\u308b\uff01<\/div><div class=\"substr\">Linux\u3067\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u304a\u3088\u3073\u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb\u3092\u6271\u3046\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<h2>\u95a2\u9023\u66f8\u7c4d\uff08Amazon\uff09<\/h2>\n<p><iframe sandbox=\"allow-popups allow-scripts allow-modals allow-forms allow-same-origin\" style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=infotecr-22&language=ja_JP&o=9&p=8&l=as4&m=amazon&f=ifr&ref=as_ss_li_til&asins=4774174041&linkId=1be31975ee817bf3bb17e2a366509519\"><\/iframe><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u3067\u30c6\u30ad\u30b9\u30c8\u306e\u691c\u7d22\u3067\u6b63\u898f\u8868\u73fe\uff0f\u62e1\u5f35\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":5527,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[110],"tags":[1084,282,25,1078,813,1086],"class_list":["post-9409","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-processing","tag-grep","tag-linux","tag-25","tag-1078","tag-813","tag-1086"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/9409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=9409"}],"version-history":[{"count":1,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/9409\/revisions"}],"predecessor-version":[{"id":14921,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/9409\/revisions\/14921"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/5527"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=9409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=9409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=9409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}