{"id":8314,"date":"2023-01-22T09:40:43","date_gmt":"2023-01-22T00:40:43","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=8314"},"modified":"2023-09-08T06:46:37","modified_gmt":"2023-09-07T21:46:37","slug":"linux%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%81%ae%e5%a4%89%e6%9b%b4%e5%86%85%e5%ae%b9%e3%82%92%e7%a2%ba%e8%aa%8d%e3%81%99%e3%82%8b%ef%bc%81%ef%bc%88diff%ef%bc%89","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/8314","title":{"rendered":"Linux\u3067\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u5185\u5bb9\u3092\u78ba\u8a8d\u3059\u308b\uff01\uff08cp -pi\uff0fdiff\uff09"},"content":{"rendered":"<p>Linux\u3067\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306a\u3069\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u3057\u305f\u5834\u5408\u306b\u3001\u5909\u66f4\u524d\u5f8c\u3067\u30d5\u30a1\u30a4\u30eb\u306e\u5dee\u5206\u3092\u78ba\u8a8d\u3057\u3066\u3001\u6b63\u3057\u304f\u5909\u66f4\u3067\u304d\u305f\u304b\u300cdiff\u300d\u30b3\u30de\u30f3\u30c9\u3067\u78ba\u8a8d\u3057\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>\u5909\u66f4\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u53d6\u5f97\u3059\u308b\uff01<\/h2>\n<p>\u5909\u66f4\u524d\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\u30d5\u30a1\u30a4\u30eb\u306e\u30b3\u30d4\u30fc\u306f\u3001\u300c-p\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u5c5e\u6027\u3082\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002\u3055\u3089\u306b\u3001\u300c-i\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3082\u4f7f\u7528\u3057\u3066\u3001\u30b3\u30d4\u30fc\u5148\u306b\u30d5\u30a1\u30a4\u30eb\u304c\u3059\u3067\u306b\u5b58\u5728\u3057\u306a\u3044\u304b\u306e\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo cp -pi \/etc\/hosts \/tmp\/hosts_bak\r\n<\/pre>\n<h2>\u30d5\u30a1\u30a4\u30eb\u3092\u5185\u5bb9\u3092\u5909\u66f4\u3059\u308b\uff01<\/h2>\n<p>\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u3092\u5909\u66f4\u3057\u307e\u3059\u3002\u4eca\u56de\u306f\u3001\u300c\/etc\/hosts\u300d\u30d5\u30a1\u30a4\u30eb\u306e\u672b\u5c3e\u306b1\u884c\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo vi \/etc\/hosts\r\n...\r\n10.1.99.6       server06\r\n<\/pre>\n<h2>\u30d5\u30a1\u30a4\u30eb\u306e\u5dee\u5206\u3092\u8868\u793a\u3059\u308b\uff01<\/h2>\n<p>\u5909\u66f4\u5185\u5bb9\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u6bd4\u8f03\u5143\u306b1\u884c\u8ffd\u52a0\u3055\u308c\u305f\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo diff \/etc\/hosts \/tmp\/hosts_bak\r\n237d236\r\n&lt; 10.1.99.6       server06\r\n<\/pre>\n<h2>\u5909\u66f4\u3092\u5143\u306b\u623b\u3059\uff01<\/h2>\n<p>\u5909\u66f4\u524d\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u53d6\u5f97\u3057\u3066\u304a\u3051\u3070\u3001\u5909\u66f4\u524d\u306b\u623b\u3059\u3053\u3068\u306f\u5bb9\u6613\u3067\u3059\u3002\u5909\u66f4\u3092\u623b\u3057\u305f\u3042\u3068\u3082\u3001\u300cdiff\u300d\u30b3\u30de\u30f3\u30c9\u3067\u78ba\u8a8d\u3092\u53d6\u308a\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,3]; title: ; notranslate\" title=\"\">\r\n$ sudo cp -pi \/tmp\/hosts_bak \/etc\/hosts\r\ncp: overwrite '\/etc\/hosts'? y\r\n$ sudo diff \/etc\/hosts \/tmp\/hosts_bak\r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>\u300cdiff\u300d\u30b3\u30de\u30f3\u30c9\u306f\u3001\u5909\u66f4\u91cf\u304c\u591a\u304f\u306a\u3044\u5834\u5408\u306b\u3001\u6b63\u3057\u304f\u5909\u66f4\u3092\u884c\u3048\u305f\u304b\u78ba\u8a8d\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\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><a href=\"https:\/\/amzn.to\/3H5qkUu\" rel=\"noopener\" target=\"_blank\"><img decoding=\"async\" class=\"paapi5-pa-product-image-source\" src=\"https:\/\/m.media-amazon.com\/images\/I\/51ZPkoBGdZL._SL160_.jpg\" alt=\"N\/A\"><\/a><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u3067\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306a\u3069\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u3057\u305f\u5834\u5408\u306b\u3001\u5909\u66f4\u524d\u5f8c\u3067\u30d5\u30a1\u30a4\u30eb\u306e\u5dee\u5206\u3092\u78ba\u8a8d\u3057\u3066\u3001\u6b63\u3057\u304f\u5909\u66f4\u3067\u304d\u305f\u304b\u300cdiff\u300d\u30b3\u30de\u30f3\u30c9\u3067\u78ba\u8a8d\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":[1108,1109,282,25,1078,1107,1106],"class_list":["post-8314","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-processing","tag-cp","tag-diff","tag-linux","tag-25","tag-1078","tag-1107","tag-1106"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/8314","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=8314"}],"version-history":[{"count":1,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/8314\/revisions"}],"predecessor-version":[{"id":14931,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/8314\/revisions\/14931"}],"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=8314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=8314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=8314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}