{"id":1486,"date":"2014-10-17T10:00:52","date_gmt":"2014-10-17T01:00:52","guid":{"rendered":"http:\/\/www.skyarch.net\/blog\/?p=1486"},"modified":"2014-10-31T21:39:15","modified_gmt":"2014-10-31T12:39:15","slug":"%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%e3%81%ae%e5%9f%ba%e7%a4%8e","status":"publish","type":"post","link":"https:\/\/www.skyarch.net\/blog\/%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%e3%81%ae%e5%9f%ba%e7%a4%8e\/","title":{"rendered":"\u6b63\u898f\u8868\u73fe\u306e\u57fa\u790e"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>\u3053\u3093\u306b\u3061\u306f\uff01\u4eca\u56de\u306f\u6b63\u898f\u8868\u73fe\u306b\u3064\u3044\u3066\u5177\u4f53\u4f8b\u3092\u7528\u3044\u3066\u7c21\u5358\u306b\u7d39\u4ecb\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u6b63\u898f\u8868\u73fe\u306flinux\u3092\u4f7f\u3063\u3066\u3044\u308c\u3070\u907f\u3051\u3066\u306f\u901a\u308c\u306a\u3044\u3068\u3044\u3063\u3066\u3082\u904e\u8a00\u3067\u306f\u306a\u3044\u307b\u3069\u3088\u304f\u4f7f\u3046\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u3044\u3053\u306a\u3059\u3053\u3068\u3067\u3088\u308a\u52b9\u7387\u7684\u306b\u63a2\u3057\u3066\u3044\u308b\u30d5\u30a1\u30a4\u30eb\u3084\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u8a72\u5f53\u7b87\u6240\u3092\u898b\u3064\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001\u6b63\u898f\u8868\u73fe\u3068\u306f\u300c<strong>\u7279\u5b9a\u306e\u6761\u4ef6\u3092\u8868\u3059\u6587\u5b57\u5217<\/strong>\u3092\u8868\u73fe\u3057\u305f\u3082\u306e\u300d\u3067\u3059\u3002\u3053\u306e\u7279\u5b9a\u306e\u6761\u4ef6\u3092\u6307\u5b9a\u3059\u308b\u6642\u306b\u5f79\u7acb\u3064\u306e\u304c<strong>\u30e1\u30bf\u30ad\u30e3\u30e9\u30af\u30bf<\/strong>\u3068\u547c\u3070\u308c\u308b\u7279\u6b8a\u8a18\u53f7\u3067\u3059<strong>\u3002<\/strong>\u4eca\u56de\u306f\u4e3b\u8981\u306a\u30e1\u30bf\u30ad\u30e3\u30e9\u30af\u30bf\u306e\u8aac\u660e\u3092\u4f8b\u3092\u7528\u3044\u306a\u304c\u3089\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: blue;font-size: big\">\u2460\u300c\uff0a\u300d\u20260\u6587\u5b57\u4ee5\u4e0a\u306e\u6587\u5b57\u3001\u6587\u5b57\u5217<\/span><\/strong><\/p>\n<p>\u300ca*\u300d\u306f\u3001ab\u3001abb\u3001a123\u3001aaaaaaaa \u306e\u3044\u305a\u308c\u306b\u3082\u30de\u30c3\u30c1\u3057\u307e\u3059\u3002<\/p>\n<p>\uff11\u3064\u76ee\u306e\u4f8b\u3067\u306f\/var\/log\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u300cmail\u300d\u304b\u3089\u59cb\u307e\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>2\u3064\u76ee\u306e\u4f8b\u3067\u306f\u672b\u5c3e\u304c\u300c.log\u300d\u3067\u7d42\u308f\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<table style=\"border-style: solid\" bgcolor=\"black\">\n<tbody>\n<tr>\n<td><span style=\"color: white;font-size: small\"># ls mail*<\/span><br \/>\n<span style=\"color: white;font-size: small\">maillog \u00a0maillog-20140827 \u00a0maillog-20140903 \u00a0maillog-20140910 \u00a0maillog-20140917<\/span><br \/>\n<span style=\"color: white;font-size: small\"># ls *.log<\/span><br \/>\n<span style=\"color: white;font-size: small\">boot.log \u00a0cloud-init.log \u00a0dracut.log \u00a0mysqld.log \u00a0yum.log<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong><span style=\"color: blue\">\u2461\u300c\uff1f\u300d\u2026\u4efb\u610f\u306e\uff11\u6587\u5b57<\/span><\/strong><\/p>\n<p>\u300ca?c\u300d\u306f\u3001abc\u3001axc\u3001a1c\u306e\u3044\u305a\u308c\u306b\u3082\u30de\u30c3\u30c1\u3057\u307e\u3059\u3002<\/p>\n<table style=\"border-style: solid\" bgcolor=\"black\">\n<tbody>\n<tr>\n<td><span style=\"color: white;font-size: small\"># ls<\/span><br \/>\n<span style=\"color: white;font-size: small\">atest.c \u00a0atest.log \u00a0atest.txt \u00a0btest.c \u00a0btest.log \u00a0btest.txt<br \/>\n<\/span><span style=\"color: white;font-size: small\"># ls ?test.txt<\/span><br \/>\n<span style=\"color: white;font-size: small\">atest.txt \u00a0btest.txt<br \/>\n<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong><span style=\"color: blue\">\u2462\u300c\u3000[]\u3000\u300d\u2026 []\u5185\u306e\u3044\u305a\u308c\u304b\uff11\u6587\u5b57<\/span><\/strong><\/p>\n<p>a[123]b\u306f\u3001a1b,a2b,a3b\u306e\u3044\u305a\u308c\u306b\u3082\u30de\u30c3\u30c1\u3057\u307e\u3059\u3002<\/p>\n<p>\u300c-\u300d\u3067\u7bc4\u56f2\u6307\u5b9a\u3002\u300c^\u300d\u304c\u5148\u982d\u306b\u3042\u308b\u6642\u306f\u300c\uff5e\u4ee5\u5916\u300d\u3092\u8868\u3057\u307e\u3059\u3002<\/p>\n<p>1\u3064\u76ee\u306e\u4f8b\u3067\u306ftest1~5\u306e\u30d5\u30a1\u30a4\u30eb\u3092[]\u3067\u7bc4\u56f2\u6307\u5b9a\u3057\u3066\u6a19\u6e96\u51fa\u529b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\uff12\u3064\u76ee\u306e\u4f8b\u3067\u306f\u5148\u982d\u306e\u6587\u5b57\u304c a,b,c \u4ee5\u5916\u306edtest.txt\u30d5\u30a1\u30a4\u30eb\u3092\u6a19\u6e96\u51fa\u529b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<table style=\"border-style: solid\" bgcolor=\"black\">\n<tbody>\n<tr>\n<td><span style=\"color: white;font-size: small\"># ls\u00a0<\/span><br \/>\n<span style=\"color: white;font-size: small\">test1.txt \u00a0test2.txt \u00a0test3.txt \u00a0test4.txt \u00a0test5.txt \u00a0test6.txt \u00a0test7.txt \u00a0test8.txt \u00a0test9.txt<\/span><br \/>\n<span style=\"color: white;font-size: small\"># ls\u3000test[1-5].txt<\/span><br \/>\n<span style=\"color: white;font-size: small\">test1.txt \u00a0test2.txt \u00a0test3.txt \u00a0test4.txt \u00a0test5.txt<\/span><br \/>\n<span style=\"color: white;font-size: small\"># ls\u3000<\/span><br \/>\n<span style=\"color: white;font-size: small\">atest.txt \u00a0btest.txt \u00a0ctest.txt \u00a0dtest.txt<\/span><br \/>\n<span style=\"color: white;font-size: small\">#ls [^abc]test.txt<\/span><br \/>\n<span style=\"color: white;font-size: small\">dtest.txt<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong><span style=\"color: blue\">\u2463\u300c\uff5b\uff5d\u300d\u2026\u300c,\u300d\u3067\u533a\u5207\u3089\u308c\u305f\u6587\u5b57\u5217\u306b\u30de\u30c3\u30c1\u3059\u308b\u3002<\/span><\/strong><\/p>\n<table style=\"border-style: solid\" bgcolor=\"black\">\n<tbody>\n<tr>\n<td><span style=\"color: white;font-size: small\"># ls<\/span><br \/>\n<span style=\"color: white;font-size: small\"><span style=\"color: white;font-size: small\">test1 test2 test3<br \/>\n<\/span><\/span><span style=\"color: white;font-size: small\"><span style=\"color: white;font-size: small\"># ls test{1,3}<br \/>\ntest1 test3<\/span><\/span><span style=\"color: white;font-size: small\"><span style=\"color: white;font-size: small\"><br \/>\n<\/span> <\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong><span style=\"color: blue\">\u2464\u300c^\u300d\u2026\u884c\u982d\u3000\u300c$\u300d\u2026\u884c\u672b<\/span><\/strong><\/p>\n<p>1\u3064\u76ee\u306e\u4f8b\u3067\u306ftest.txt\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u306b\u3042\u308b\u884c\u982d\u304ca\u306e\u3082\u306e\u3092\u691c\u7d22\u3057\u3066\u6a19\u6e96\u51fa\u529b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>2\u3064\u76ee\u306e\u4f8b\u3067\u306ftest.txt\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u306b\u3042\u308b\u884c\u672b\u304ct\u306e\u3082\u306e\u3092\u691c\u7d22\u3057\u3066\u6a19\u6e96\u51fa\u529b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<table style=\"border-style: solid\" bgcolor=\"black\">\n<tbody>\n<tr>\n<td><span style=\"color: white;font-size: small\"># cat test.txt<\/span><br \/>\n<span style=\"color: white;font-size: small\"><span style=\"color: white;font-size: small\">apple<br \/>\napache<br \/>\nbig<br \/>\nbus<br \/>\ncat<br \/>\ncut\u00a0<\/span><\/span><br \/>\n<span style=\"color: white;font-size: small\"><span style=\"color: white;font-size: small\"># grep ^a test.txt<br \/>\napple<br \/>\napache<\/span><\/span><br \/>\n<span style=\"color: white;font-size: small\"><span style=\"color: white;font-size: small\"># grep t$ test.txt<br \/>\ncat<br \/>\ncut<br \/>\n<\/span> <\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong><span style=\"color: blue\">\u2465\u300c.\u300d\u2026\u4efb\u610f\u306e\uff11\u6587\u5b57\u304b<\/span><\/strong><\/p>\n<p>\u300ca.c\u300d\u306f\u3001abc\u3001axc\u3001a1c\u306e\u3044\u305a\u308c\u306b\u3082\u30de\u30c3\u30c1\u3057\u307e\u3059\u3002<\/p>\n<table style=\"border-style: solid\" bgcolor=\"black\">\n<tbody>\n<tr>\n<td><span style=\"color: white;font-size: small\">#cat test.txt<\/span><br \/>\n<span style=\"color: white;font-size: small\">apple<br \/>\napache<br \/>\nbig<br \/>\nbus<br \/>\ncat<br \/>\ncut<\/span><br \/>\n<span style=\"color: white;font-size: small\">#grep c.t test.txt<\/span><br \/>\n<span style=\"color: white;font-size: small\">cat<br \/>\ncut<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6b63\u898f\u8868\u73fe\u306b\u95a2\u3057\u3066\u306f\u5b9f\u969b\u306b\u624b\u3092\u52d5\u304b\u3057\u306a\u304c\u3089\u899a\u3048\u305f\u307b\u3046\u304c\u3088\u308a\u899a\u3048\u3084\u3059\u3044\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u307e\u3060\u5b8c\u74a7\u306b\u30de\u30b9\u30bf\u30fc\u3057\u3066\u3044\u306a\u3044\u3068\u3044\u3046\u65b9\u306f\u305c\u3072\u5b9f\u969b\u306b\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3063\u3066\u3044\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; \u3053\u3093\u306b\u3061\u306f\uff01\u4eca\u56de\u306f\u6b63\u898f\u8868\u73fe\u306b\u3064\u3044\u3066\u5177\u4f53\u4f8b\u3092\u7528\u3044\u3066\u7c21\u5358\u306b\u7d39\u4ecb\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u6b63\u898f\u8868\u73fe\u306flinux\u3092\u4f7f\u3063\u3066\u3044\u308c\u3070\u907f\u3051\u3066\u306f\u901a\u308c\u306a\u3044\u3068\u3044\u3063\u3066\u3082\u904e\u8a00\u3067\u306f\u306a\u3044\u307b\u3069\u3088\u304f\u4f7f\u3046\u3082\u306e\u3067\u3059\u3002 \u6b63\u898f\u8868\u73fe\u3092\u4f7f\u3044\u3053\u306a\u3059\u3053\u3068\u3067&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1539,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"","_original_post":"","footnotes":""},"categories":[29,9],"tags":[],"class_list":{"0":"post-1486","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-linux","8":"category-dev","9":"ja"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/1486","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/comments?post=1486"}],"version-history":[{"count":19,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/1486\/revisions"}],"predecessor-version":[{"id":1794,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/1486\/revisions\/1794"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media\/1539"}],"wp:attachment":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media?parent=1486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/categories?post=1486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/tags?post=1486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}