{"id":1369,"date":"2024-05-24T09:07:33","date_gmt":"2024-05-24T00:07:33","guid":{"rendered":"http:\/\/wp.ultimai.org\/wp\/?p=1369"},"modified":"2024-12-11T06:23:32","modified_gmt":"2024-12-10T21:23:32","slug":"linux-command","status":"publish","type":"post","link":"https:\/\/wp.ultimai.org\/?p=1369","title":{"rendered":"linux command \u3088\u304f\u4f7f\u3046\u3084\u3064 (centos)"},"content":{"rendered":"<h5>\u30b3\u30de\u30f3\u30c9\u306f\u66f8\u304d\u63db\u3048\u3066\u304b\u3089\u30b3\u30d4\u30fc\u3067\u304d\u308b<\/h5>\n<p><strong>\u7279\u5b9a\u306e\u6587\u5b57\u5217\u542b\u3080\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22\u3059\u308b\u30b3\u30de\u30f3\u30c9<\/strong><br \/>\n<input class=\"tarminal-copy\" type=\"text\" value=\"find .\/ -type f -print | xargs grep 'hoge'\" \/><\/p>\n<p>\u7279\u5b9a\u306e\u6587\u5b57\u5217\u542b\u3080\u30d5\u30a1\u30a4\u30eb\u3092\u62e1\u5f35\u5b50\u6307\u5b9a\u3067\u691c\u7d22\u3059\u308b\u30b3\u30de\u30f3\u30c9<br \/>\n<input class=\"tarminal-copy\" type=\"text\" value=\"find .\/ -name '*.php' -type f -print | xargs grep 'hoge'\" \/><\/p>\n<p>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea(strage)\u3092\u9664\u5916\u3057\u3066\u7279\u5b9a\u306e\u6587\u5b57\u5217(admin)\u542b\u3080\u30d5\u30a1\u30a4\u30eb\u3092\u62e1\u5f35\u5b50\u6307\u5b9a\u3067\u691c\u7d22\u3059\u308b\u30b3\u30de\u30f3\u30c9<br \/>\n<input class=\"tarminal-copy\" type=\"text\" value=\"find .\/ -type d -name strage -prune -o -name '*.php' -type f -print | xargs grep 'admin'\" \/><\/p>\n<p>\u8a18\u53f7\u3092\u542b\u3080\u6587\u5b57\u3092\u691c\u7d22\u3059\u308b<br \/>\n<input class=\"tarminal-copy\" type=\"text\" value=\"find .\/ -type f -print | xargs grep -F 'lkj.fdsa@aaaa.ssss.jp'\" \/><\/p>\n<p>\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u306e\u7279\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4e00\u62ec\u3057\u3066\u524a\u9664\u3059\u308b<br \/>\n<br \/>\n\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u6307\u5b9a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u3092\u691c\u7d22<br \/>\n<input class=\"tarminal-copy\" type=\"text\" value=\"find .\/ -name &quot;desktop.ini&quot; -print\" \/><\/p>\n<p>\u65e5\u4ed8\u3067\u691c\u7d22\u3059\u308b (10\u65e5\u4ee5\u5185\u306b\u7de8\u96c6)<br \/>\n<input class=\"tarminal-copy\" type=\"text\" value=\"find .\/ -mtime -10 -ls\" \/><\/p>\n<p>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u9664\u5916\u3057\u3066\u65e5\u4ed8\u3067\u691c\u7d22\u3059\u308b (3\u65e5\u4ee5\u5185\u306b\u7de8\u96c6)<br \/>\n<input class=\"tarminal-copy\" type=\"text\" value=\"find .\/ -type d -name .git -prune -o -type f -mtime -3 -ls\" \/><\/p>\n<p>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u9664\u5916\u3057\u3066\u6642\u9593\u3067\u691c\u7d22\u3059\u308b (2\u6642\u9593\u4ee5\u5185\u306b\u7de8\u96c6)<br \/>\n<input class=\"tarminal-copy\" type=\"text\" value=\"find .\/ -type d -name storage -prune -o -type f -mmin -120 -ls\" \/><\/p>\n<p>\u66f4\u65b0\u65e5\u9806\u306b\u8868\u793a\u3059\u308b<br \/>\n<input class=\"tarminal-copy\" type=\"text\" value=\"find .\/ -type f -print0 | xargs -0 ls -alt\" \/><\/p>\n<p>\u66f4\u65b0\u65e5\u9806\u306b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u9664\u5916\u3057\u3066\u8868\u793a\u3059\u308b<br \/>\n<input class=\"tarminal-copy\" type=\"text\" value=\"find .\/ -type d -name .git -prune -o -type f -mtime -1 -type f -print0 | xargs -0 ls -alt\" \/><\/p>\n<ul class=\"org-ul\">\n<li><code>find -type f<\/code> \u306f\u30d5\u30a1\u30a4\u30eb\u306e\u307f\u3092\u5bfe\u8c61\u3068\u3059\u308b<\/li>\n<li><code>find -print0<\/code> \u306f\u691c\u51fa\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u30d5\u30eb\u30d1\u30b9\u3092NULL\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\u3067\u5206\u5272\u3057\u3066\u51fa\u529b\u3059\u308b<\/li>\n<li><code>xargs -0<\/code> \u3082\u3057\u304f\u306f <code>xargs --null<\/code> \u5165\u529b\u30b9\u30c8\u30ea\u30fc\u30e0\u306e\u5206\u5272\u306fNULL\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\u3092\u7528\u3044\u308b<\/li>\n<\/ul>\n<pre class=\"tarminal\"> \r\n\u7279\u5b9a\u306e\u65e5\u306b\u66f4\u65b0\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u898b\u3064\u3051\u308b\r\n find . -type f -name \"*.php\" -newermt \"2020-09-25\"\r\n<\/pre>\n<p>\u4e00\u62ec\u5909\u66f4 (\u4eca\u3044\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e )<br \/>\n<input class=\"tarminal-copy\" type=\"text\" value=\"chown -R apache:ginzo .\/*\" \/><\/p>\n<p>\u30d5\u30a1\u30a4\u30eb\u79fb\u52d5 \uff64\u540d\u524d\u5909\u66f4<br \/>\n<input class=\"tarminal-copy\" type=\"text\" value=\"mv newdata_damy\/* newdata\/\" \/><br \/>\n\u30b3\u30d4\u30fc A to B<br \/>\n<input class=\"tarminal-copy\" type=\"text\" value=\"cp \/usr\/config.inc.php \/usr\/share\/config.inc.php\" \/><\/p>\n<p>vi\u30a8\u30c7\u30a3\u30bf\u306b\u884c\u756a\u53f7<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"><input class=\"tarminal-copy\" type=\"text\" value=\"echo &quot;set number&quot; &gt;&gt; ~\/.exrc\" \/>\r\n<\/pre>\n<p>\u5168\u3066\u306ephp\u304c755\u306b\u3001html\u306f644\u306b\u306a\u308b<br \/>\n<input class=\"tarminal-copy\" type=\"text\" value=\"find \/\/home\/ultimai\/www\/asset\/ -name \\*.php -exec chmod 755 {} \\;\" \/><br \/>\n<input class=\"tarminal-copy\" type=\"text\" value=\"find \/var\/www\/html\/mdlsrc\/ -name \\*.php -exec chmod 644 {} \\;\" \/><\/p>\n<p>\u30ed\u30fc\u30ab\u30eb\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30e2\u30fc\u30c8\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<br \/>\n# -a \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u30a2\u30b9\u30ad\u30fc\u8ee2\u9001 (\u30c7\u30d5\u30a9\u30eb\u30c8\u306f\u30d0\u30a4\u30ca\u30ea\u8ee2\u9001)<br \/>\n<input class=\"tarminal-copy\" type=\"text\" value=\"lftp daa.jp-user@ftp.exzample.daa.jp\/web\/www\/ put \/var\/www\/html\/mdl.zip\" \/><br \/>\nFTPserver : ftp.exzample.daa.jp<br \/>\nFTP account : daa.jp-user<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30b3\u30de\u30f3\u30c9\u306f\u66f8\u304d\u63db\u3048\u3066\u304b\u3089\u30b3\u30d4\u30fc\u3067\u304d\u308b \u7279\u5b9a\u306e\u6587\u5b57\u5217 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":true,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[67,37],"class_list":["post-1369","post","type-post","status-publish","format-standard","hentry","category-linux","tag-command","tag-wsl"],"_links":{"self":[{"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/posts\/1369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1369"}],"version-history":[{"count":7,"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/posts\/1369\/revisions"}],"predecessor-version":[{"id":2313,"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/posts\/1369\/revisions\/2313"}],"wp:attachment":[{"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}