{"id":2206,"date":"2018-11-02T21:38:53","date_gmt":"2018-11-02T12:38:53","guid":{"rendered":"http:\/\/matoken.org\/blog\/?p=2206"},"modified":"2018-11-11T15:37:32","modified_gmt":"2018-11-11T06:37:32","slug":"trouble-with-the-contents-of-the-file-synchronized-by-rsync","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2018\/11\/02\/trouble-with-the-contents-of-the-file-synchronized-by-rsync\/","title":{"rendered":"rsync\u3067\u540c\u671f\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u304c\u9593\u9055\u3063\u3066\u3044\u3066\u56f0\u308b"},"content":{"rendered":"<div id=\"__asciidoctor-preview-1__\" class=\"paragraph\">\n<p>\u6700\u8fd1\u5916\u306e\u30b5\u30fc\u30d0\u306effmpeg\u3067\u751f\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092rsync\u30b3\u30de\u30f3\u30c9\u3067\u5bb6\u306b\u30b3\u30d4\u30fc\u3057\u3066\u3044\u307e\u3059\uff0e\u3057\u304b\u3057\uff0c\u5148\u65e5rsync\u3067\u30b3\u30d4\u30fc\u304c\u6b63\u5e38\u7d42\u4e86\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306a\u306e\u306b\u518d\u751f\u304c\u51fa\u6765\u306a\u3044\u30d5\u30a1\u30a4\u30eb\u304c\u73fe\u308c\u307e\u3057\u305f\uff0e<br \/>\n\u6050\u3089\u304fffmpeg\u306e\u51e6\u7406\u304c\u6700\u5f8c\u307e\u3067\u7d42\u308f\u3063\u3066\u3044\u306a\u3044\u72b6\u614b\u3067rsync\u3092\u958b\u59cb\u3057\u3066\uff0cffmpeg\u306e <code style=\"font-family: monospace;\">-movflags faststart<\/code> \u304c\u6700\u5f8c\u306e\u3042\u305f\u308a\u3067rsync\u3067\u8ee2\u9001\u304c\u7d42\u308f\u3063\u305f\u9818\u57df\u3092\u66f8\u304d\u63db\u3048\u305f\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\uff0e<br \/>\nrsync\u306f\u30c1\u30a7\u30c3\u30af\u30b5\u30e0\u3092\u78ba\u8a8d\u3057\u3066\u3044\u305f\u306e\u3067\u306f?\u3068\u78ba\u8a8d\u3059\u308b\u3068\u3069\u3046\u3082\u660e\u793a\u7684\u306b\u30c1\u30a7\u30c3\u30af\u30b5\u30e0\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u4e0e\u3057\u306a\u3044\u3068\u7c21\u6613\u7684\u306a\u30c1\u30a7\u30c3\u30af\u3057\u304b\u3057\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3059\uff0e<br \/>\n\u5c11\u3057\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-2__\" class=\"paragraph\">\n<p>\u5185\u5bb9\u304c\u9055\u3046\u3051\u308c\u3069\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u3068\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u306e\u540c\u3058\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u3059\u308b\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-3__\" class=\"listingblock\">\n<div class=\"content\">\n<pre>$ mkdir from to\r\n$ echo '0123456789' &gt; from\/01\r\n$ echo '0123456780' &gt; to\/01\r\n$ touch -d0 from\/01\r\n$ touch -d0 to\/01\r\n$ ls -l from\/01 to\/01\r\n-rw-r--r-- 1 matoken matoken 11 11\u6708  2 00:00 from\/01\r\n-rw-r--r-- 1 matoken matoken 11 11\u6708  2 00:00 to\/01<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-4__\" class=\"paragraph\">\n<p>rsync \u306e <code style=\"font-family: monospace;\">--archive<\/code> option \u3067\u30b3\u30d4\u30fc\u3059\u308b\u3068\u540c\u3058\u30d5\u30a1\u30a4\u30eb\u3068\u8a8d\u8b58\u3055\u308c\u3066\u540c\u671f\u3055\u308c\u306a\u3044\uff0e\u5185\u5bb9\u3082\u7570\u306a\u3063\u305f\u307e\u307e\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-5__\" class=\"listingblock\">\n<div class=\"content\">\n<pre>$ rsync -av from\/ to\/\r\nsending incremental file list\r\n\r\nsent 73 bytes  received 12 bytes  170.00 bytes\/sec\r\ntotal size is 11  speedup is 0.13\r\n$ diff from\/01 to\/01\r\n1c1\r\n&lt; 0123456789\r\n---\r\n&gt; 0123456780<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-6__\" class=\"paragraph\">\n<p>rsync \u306e <code style=\"font-family: monospace;\">--checksum<\/code> option\u3092\u4ed8\u4e0e\u3059\u308b\u3068\u5225\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u8a8d\u8b58\u3055\u308c\u3066\u540c\u671f\u3055\u308c\u3066\u5185\u5bb9\u3082\u540c\u4e00\u306b\u306a\u308b\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-7__\" class=\"listingblock\">\n<div class=\"content\">\n<pre>$ rsync -av --checksum from\/ to\/\r\nsending incremental file list\r\n01\r\n\r\nsent 147 bytes  received 35 bytes  364.00 bytes\/sec\r\ntotal size is 11  speedup is 0.06\r\n$ diff from\/01 to\/01<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-8__\" class=\"paragraph\">\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3053\u3093\u306a\u611f\u3058\u306b\u5909\u66f4\u3057\u305f\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-9__\" class=\"listingblock\">\n<div class=\"content\">\n<pre>$ rsync -avAHXce ssh --partial --append user@server:from\/ to\/<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-10__\" class=\"paragraph\">\n<p>\uff03\u5b9f\u969b\u306f\u3088\u304f\u56de\u7dda\u5207\u308c\u308b\u306e\u3067while loop \u306b\u5165\u308c\u3066\u3042\u308b\uff0e<\/p>\n<\/div>\n<div>\n<p>EDIT: \u8ee2\u9001\u6e08\u307f\u90e8\u5206\u306e\u30c1\u30a7\u30c3\u30af\u306f\u3053\u308c\u3067\u306fNG\u3067 <code style=\"font-family: monospace;\">--append<\/code>(\u65e2\u5b58\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u8ffd\u8a18)\u3092\u524a\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\uff0e<code style=\"font-family: monospace;\">--append-verify<\/code> \u3067\u884c\u3051\u305d\u3046\u306a\u6c17\u304c\u3057\u305f\u304c\u3053\u308c\u3082NG\u3060\u3063\u305f\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-11__\" class=\"listingblock\">\n<div class=\"title\">\u74b0\u5883<\/div>\n<div class=\"content\">\n<pre>$ dpkg-query -W rsync\r\nrsync   3.1.2-2.2\r\n$ lsb_release -d\r\nDescription:    Ubuntu 18.10\r\n$ uname -m\r\nx86_64<\/pre>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u5916\u306e\u30b5\u30fc\u30d0\u306effmpeg\u3067\u751f\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092rsync\u30b3\u30de\u30f3\u30c9\u3067\u5bb6\u306b\u30b3\u30d4\u30fc\u3057\u3066\u3044\u307e\u3059\uff0e\u3057\u304b\u3057\uff0c\u5148\u65e5rsync\u3067\u30b3\u30d4\u30fc\u304c\u6b63\u5e38\u7d42\u4e86\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306a\u306e\u306b\u518d\u751f\u304c\u51fa\u6765\u306a\u3044\u30d5\u30a1\u30a4\u30eb\u304c\u73fe\u308c\u307e\u3057\u305f\uff0e \u6050\u3089\u304fffmpeg\u306e\u51e6\u7406\u304c\u6700\u5f8c\u307e\u3067 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[434,6,63],"tags":[119],"class_list":["post-2206","post","type-post","status-publish","format-standard","hentry","category-cosmic-cuttlefish18-10","category-linux","category-ubuntu","tag-rsync"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/2206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=2206"}],"version-history":[{"count":0,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/2206\/revisions"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=2206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=2206"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=2206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}