{"id":3615,"date":"2018-05-29T22:13:15","date_gmt":"2018-05-29T13:13:15","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=3615"},"modified":"2023-05-27T21:22:21","modified_gmt":"2023-05-27T12:22:21","slug":"%e3%80%90linux%e3%80%91%e5%88%9d%e5%bf%83%e8%80%85%e5%90%91%e3%81%91%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%81%ae%e6%a4%9c%e7%b4%a2","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=3615","title":{"rendered":"\u3010Linux\u3011(\u521d\u5fc3\u8005\u5411\u3051)\u30d5\u30a1\u30a4\u30eb\u306e\u69d8\u3005\u306a\u691c\u7d22\u65b9\u6cd5"},"content":{"rendered":"<p>Linux\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22\u3059\u308b\u5834\u5408\u306f\u3001\u69d8\u3005\u306a\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u691c\u7d22<\/h2>\n<h3>locate\u30b3\u30de\u30f3\u30c9<\/h3>\n<pre class=\"lang:default decode:true\">locate \u30d5\u30a1\u30a4\u30eb\u540d\u30d1\u30bf\u30fc\u30f3<\/pre>\n<p><span style=\"color: #ff0000;\"><strong>\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u3069\u306e\u968e\u5c64\u306b\u3042\u3063\u305f\u3068\u3057\u3066\u3082\u3001\u5168\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217\u3067\u691c\u7d22<\/strong><\/span>\u3092\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<h4>\u5b9f\u884c\u4f8b<\/h4>\n<pre class=\"lang:default decode:true\">[root@localhost \/]# locate spooler\r\n\/etc\/foomatic\/defaultspooler\r\n\/var\/log\/spooler\r\n\/var\/log\/spooler-20170621\r\n\/var\/log\/spooler-20170625\r\n\/var\/log\/spooler-20170706\r\n\/var\/log\/spooler-20180125<\/pre>\n<h3>find\u30b3\u30de\u30f3\u30c9<\/h3>\n<pre class=\"lang:default decode:true\">find \u691c\u7d22\u5bfe\u8c61\u30d1\u30b9(\u7701\u7565\u3059\u308b\u3068\u30ab\u30ec\u30f3\u30c8\u4ee5\u4e0b\u3092\u691c\u7d22\u3059\u308b) \u691c\u7d22\u5f0f<\/pre>\n<p>find\u30b3\u30de\u30f3\u30c9\u306f\u3001\u57fa\u672c\u7684\u306a\u52d5\u4f5c\u306flocate\u30b3\u30de\u30f3\u30c9\u3068\u540c\u69d8\u3067\u3059\u304c\u4e0b\u8a18\u306e\u70b9\u306e\u52d5\u4f5c\u304c\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u3092\u691c\u7d22\u3059\u308b\u70b9<\/li>\n<li>\u69d8\u3005\u306a\u6761\u4ef6\u5f0f\u3092\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3067\u304d\u308b\u70b9<\/li>\n<\/ul>\n<h4>\u5b9f\u884c\u4f8b<\/h4>\n<pre class=\"lang:default decode:true\">[root@localhost \/]# find -name \"spooler*\" -size 0k\r\n.\/var\/log\/spooler-20170621\r\n.\/var\/log\/spooler-20170706\r\n.\/var\/log\/spooler-20180125\r\n.\/var\/log\/spooler-20170625\r\n.\/var\/log\/spooler<\/pre>\n<p>\u4f8b\u3048\u3070\u3001\u4e0a\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3067\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u304c\u300cspooler\u300d\u304b\u3089\u59cb\u307e\u308a\u3001\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c0KB\u306e\u3082\u306e\u3092\u691c\u7d22\u3059\u308b\u3068\u3044\u3046\u6761\u4ef6\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>\u691c\u7d22\u5f0f\u306e\u7a2e\u985e<\/h3>\n<table>\n<tbody>\n<tr>\n<th>\u691c\u7d22\u5f0f<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>-name<\/td>\n<td>\u30d5\u30a1\u30a4\u30eb\u540d<\/td>\n<\/tr>\n<tr>\n<td>-size<\/td>\n<td>\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u3001\u4f8b\uff1a5k(5KB)\u3001+5k(5KB\u4ee5\u4e0a)\u3001-5k(5KB\u4ee5\u4e0b)<\/td>\n<\/tr>\n<tr>\n<td>-atime<\/td>\n<td>\u30d5\u30a1\u30a4\u30eb\u306e\u6700\u7d42\u30a2\u30af\u30bb\u30b9\u65e5\u6642\u3001\u4f8b\uff1a3(3\u65e5\u524d)\u3001+3(3\u65e5\u4ee5\u4e0a\u524d)\u3001-3(3\u65e5\u4ee5\u5185)<\/td>\n<\/tr>\n<tr>\n<td>-amin<\/td>\n<td>\u30d5\u30a1\u30a4\u30eb\u306e\u6700\u7d42\u30a2\u30af\u30bb\u30b9\u65e5\u6642\u3092\u5206\u5358\u4f4d\u3067\u6307\u5b9a<\/td>\n<\/tr>\n<tr>\n<td>-mtime<\/td>\n<td>\u30d5\u30a1\u30a4\u30eb\u306e\u6700\u7d42\u66f4\u65b0\u65e5\u3092\u6307\u5b9a<\/td>\n<\/tr>\n<tr>\n<td>mmin<\/td>\n<td>\u30d5\u30a1\u30a4\u30eb\u306e\u6700\u7d42\u66f4\u65b0\u6642\u523b\u3092\u5206\u5358\u4f4d\u3067\u6307\u5b9a<\/td>\n<\/tr>\n<tr>\n<td>-perm<\/td>\n<td>\u30d5\u30a1\u30a4\u30eb\u306e\u30a2\u30af\u30bb\u30b9\u6a29\u3092\u6307\u5b9a\u3001\u4f8b\uff1a666\u3001444<\/td>\n<\/tr>\n<tr>\n<td>-type<\/td>\n<td>\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7\u3092\u6307\u5b9a\uff1af(\u30d5\u30a1\u30a4\u30eb)\u3001d(\u30c7\u30a3\u30ec\u30af\u30c8\u30ea)\u3001l(\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af)<\/td>\n<\/tr>\n<tr>\n<td>-exec<\/td>\n<td>\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3055\u305b\u307e\u3059\u3002\uff08\u4f8b\u3048\u3070\u3001\u6761\u4ef6\u306b\u5408\u81f4\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u30d5\u30a1\u30a4\u30eb\u3060\u3051\u524a\u9664\u306e\u3088\u3046\u306b\u3082\u3067\u304d\u305f\u308a\u3057\u307e\u3059\u3002\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u30d5\u30a1\u30a4\u30eb\u5185\u5bb9\u306e\u691c\u7d22<\/h2>\n<h3>grep\u30b3\u30de\u30f3\u30c9<\/h3>\n<pre class=\"lang:default decode:true\">grep \u30aa\u30d7\u30b7\u30e7\u30f3 \u6587\u5b57\u30d1\u30bf\u30fc\u30f3 \u691c\u7d22\u5bfe\u8c61\u30d5\u30a1\u30a4\u30eb<\/pre>\n<h4>\u30aa\u30d7\u30b7\u30e7\u30f3\u4e00\u89a7<\/h4>\n<table>\n<tbody>\n<tr>\n<th>\u30aa\u30d7\u30b7\u30e7\u30f3<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>-F<\/td>\n<td>\u6587\u5b57\u30d1\u30bf\u30fc\u30f3\u3092\u6b63\u898f\u8868\u73fe\u3067\u306a\u304f\u3001\u5358\u306a\u308b\u6587\u5b57\u5217\u3068\u3057\u3066\u6271\u3046\u3002<\/td>\n<\/tr>\n<tr>\n<td>-c<\/td>\n<td>\u30de\u30c3\u30c1\u3057\u305f\u884c\u6570\u3060\u3051\u3092\u8868\u793a\u3059\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>-i<\/td>\n<td>\u5927\u6587\u5b57\u3001\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3057\u306a\u3044\u3002<\/td>\n<\/tr>\n<tr>\n<td>-l<\/td>\n<td>\u30de\u30c3\u30c1\u3057\u305f\u884c\u306e\u3042\u308b\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u307f\u8868\u793a\u3059\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>-n<\/td>\n<td>\u884c\u756a\u53f7\u3082\u5408\u308f\u305b\u3066\u8868\u793a\u3059\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>-v<\/td>\n<td>\u30de\u30c3\u30c1\u3057\u305f\u884c\u3067\u306f\u306a\u304f\u3001\u30de\u30c3\u30c1\u3057\u306a\u304b\u3063\u305f\u884c\u3092\u8868\u793a\u3059\u308b\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u5b9f\u884c\u4f8b<\/h3>\n<p>yum.conf\u304b\u3089\u3001\u300cma\u300d\u3068\u3044\u3046\u6587\u5b57\u5217\u3092\u884c\u756a\u53f7\u4ed8\u3067\u691c\u7d22\u3059\u308b\u5834\u5408\u306e\u4f8b<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3625\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/\u3086\uff4d.png\" alt=\"\" width=\"643\" height=\"114\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/\u3086\uff4d.png 643w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/\u3086\uff4d-300x53.png 300w\" sizes=\"(max-width: 643px) 100vw, 643px\" \/><\/p>\n<h3>\u8907\u6570\u30d5\u30a1\u30a4\u30eb\u3092\u307e\u3068\u3081\u3066grep\u3059\u308b\u5834\u5408<\/h3>\n<pre class=\"lang:default decode:true\">grep -r \"\u691c\u7d22\u6587\u5b57\u5217\u30d1\u30bf\u30fc\u30f3\" \u691c\u7d22\u30c7\u30a3\u30ec\u30af\u30c8\u30ea<\/pre>\n<p>grep\u306f\u3001\u57fa\u672c\u5358\u4e00\u30d5\u30a1\u30a4\u30eb\u5185\u306e\u6587\u5b57\u3092\u691c\u7d22\u3057\u307e\u3059\u304c\u3001\u4e0a\u8a18\u306e\u3088\u3046\u306b\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u6307\u5b9a\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u3092\u307e\u3068\u3081\u3066\u30d5\u30a1\u30a4\u30eb\u5185\u5bb9\u306e\u691c\u7d22\u3092\u304b\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u5b9f\u884c\u4f8b<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3624\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/etc.yum_.png\" alt=\"\" width=\"640\" height=\"349\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/etc.yum_.png 640w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/etc.yum_-300x164.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"Linux\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22\u3059\u308b\u5834\u5408\u306f\u3001\u69d8\u3005\u306a\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002 \u30d5\u30a1\u30a4\u30eb\u540d\u306e\u691c\u7d22 locate\u30b3\u30de\u30f3\u30c9 locate \u30d5\u30a1\u30a4\u30eb\u540d\u30d1\u30bf\u30fc\u30f3 \u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u3069\u306e\u968e\u5c64\u306b\u3042\u3063\u305f\u3068\u3057\u3066\u3082\u3001\u5168\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217\u3067\u691c [&hellip;]","protected":false},"author":1,"featured_media":3027,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[39],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/3615"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3615"}],"version-history":[{"count":10,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/3615\/revisions"}],"predecessor-version":[{"id":20344,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/3615\/revisions\/20344"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/media\/3027"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3615"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}