{"id":293213,"date":"2024-09-27T04:04:12","date_gmt":"2024-09-26T20:04:12","guid":{"rendered":"https:\/\/lrxjmw.cn\/lwjfzccmldrs.html"},"modified":"2024-09-27T04:04:12","modified_gmt":"2024-09-26T20:04:12","slug":"lwjfzccmldrs","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/lwjfzccmldrs.html","title":{"rendered":"Linux \u6587\u4ef6\u590d\u5236\uff1a\u4ece cp \u547d\u4ee4\u5230 rsync\uff0c\u6df1\u5165\u63a2\u8ba8\u590d\u5236\u529f\u80fd\u7684\u7384\u673a\u4e0e\u5b89\u5168"},"content":{"rendered":"

Linux<\/a>\u6587\u4ef6\u590d\u5236\u867d\u7136\u76f4\u89c2linux \u6587\u4ef6\u62f7\u8d1d<\/strong>\uff0c\u5b9e\u9645\u64cd\u4f5c\u65f6\u5374\u9891\u51fa\u72b6\u51b5\u3002\u672c\u6587\u5c06\u6df1\u5165\u63a2\u8ba8\u8fd9\u4e00\u65e2\u719f\u6089\u53c8\u68d8\u624b\u7684\u529f\u80fd\u70b9\u3002<\/p>\n

1.cp\u547d\u4ee4<\/a>\uff0c\u7b80\u5355\u7c97\u66b4\u5374\u6697\u85cf\u7384\u673a<\/b><\/p>\n

\u8bba\u53caLinux\u7cfb\u7edf\u4e2d\u7684\u6587\u4ef6\u590d\u5236\uff0ccp\u547d\u4ee4\u662f\u9996\u9009\u3002\u8be5\u547d\u4ee4\u64cd\u4f5c\u7b80\u6d01\uff0c\u4ec5\u9700\u5355\u884c\u6307\u4ee4\u5373\u53ef\u5b8c\u6210\u590d\u5236\u4efb\u52a1\u3002\u7136\u800c\uff0c\u5207\u52ff\u8fc7\u65e9\u4e50\u89c2\uff0ccp\u547d\u4ee4\u7684\u590d\u6742\u6027\u4e0d\u5bb9\u5c0f\u89d1\u3002<\/p>\n

cp\u547d\u4ee4\u9ed8\u8ba4\u6267\u884c\u8986\u76d6\u590d\u5236\u3002\u82e5\u4e0d\u614e\u8986\u76d6\u540c\u540d\u6587\u4ef6\u4e8e\u76ee\u6807\u6587\u4ef6\u5939\uff0c\u540e\u679c\u4e0d\u582a\u8bbe\u60f3\u3002\u4e3a\u786e\u4fdd\u5b89\u5168\uff0c\u52a1\u5fc5\u542f\u7528cp\u547d\u4ee4\u7684-i\u9009\u9879\uff0c\u4ee5\u4fbf\u7cfb\u7edf\u5728\u8986\u76d6\u524d\u63d0\u793a\u786e\u8ba4\uff0c\u9884\u9632\u4e0d\u826f\u4e8b\u4ef6\u3002<\/p>\n

cp\u547d\u4ee4\u5177\u5907\u9012\u5f52\u62f7\u8d1d\u529f\u80fd\u3002\u4e3a\u62f7\u8d1d\u6587\u4ef6\u5939\uff0c\u9700\u6dfb\u52a0-r\u9009\u9879\u3002\u65e0\u6b64\u9009\u9879\uff0ccp\u547d\u4ee4\u5c06\u9519\u8bef\u63d0\u793a\u201c\u76ee\u6807\u4e3a\u76ee\u5f55\u201d\u5e76\u4e2d\u6b62\u64cd\u4f5c\u3002<\/p>\n

2.rsync\uff0c\u62f7\u8d1d\u754c\u7684\u745e\u58eb\u519b\u5200<\/b><\/p>\n

\u62f7\u8d1d\u6587\u4ef6\u600e\u4e48\u64cd\u4f5c_linux \u6587\u4ef6\u62f7\u8d1d_\u62f7\u8d1d\u6587\u4ef6\u5230u\u76d8<\/p>\n

\u82e5\u60a8\u8ba4\u4e3acp\u6307\u4ee4\u8fc7\u4e8e\u76f4\u63a5\uff0crsync\u5c06\u662f\u60a8\u7684\u7406\u60f3\u9009\u62e9\u3002rsync\u88ab\u8a89\u4e3a\u5907\u4efd\u9886\u57df\u7684\u745e\u58eb\u519b\u5200\uff0c\u529f\u80fd\u4e30\u5bcc\uff0c\u4ee4\u4eba\u53f9\u4e3a\u89c2\u6b62\u3002<\/p>\n

rsync\u5b9e\u73b0\u4e86\u589e\u91cf\u5907\u4efd\u529f\u80fd\uff0c\u4ec5\u590d\u5236\u6709\u53d8\u52a8\u7684\u6587\u4ef6\u5185\u5bb9\uff0c\u800c\u975e\u6574\u4f53\u6587\u4ef6\u5939\u3002\u6b64\u7279\u6027\u5bf9\u4e8e\u5927\u91cf\u6587\u4ef6\u5939\u7684\u590d\u5236\u5c24\u5176\u6709\u5229\u3002\u6614\u65e5\u62f7\u8d1d\u51e0\u5341GB\u7684\u6587\u4ef6\u5939\u5f80\u5f80\u8017\u65f6\u9887\u957f\uff0c\u5982\u4eca\u501f\u52a9rsync\uff0c\u4ec5\u9700\u51e0\u5206\u949f\u5373\u53ef\u5b8c\u6210\uff0c\u6548\u7387\u663e\u8457\u63d0\u9ad8\u3002<\/p>\n

rsync\u5177\u5907\u65ad\u70b9\u7eed\u4f20\u529f\u80fd\u3002\u9047\u610f\u5916\u65ad\u7f51\u6216\u7cfb\u7edf\u5d29\u6e83\uff0crsync\u80fd\u8bb0\u5f55\u65ad\u70b9\u4f4d\u7f6e\u3002\u6062\u590d\u7f51\u7edc\u6216\u7cfb\u7edf\u540e\uff0crsync\u5c06\u81ea\u52a8\u4ece\u65ad\u70b9\u7eed\u4f20\uff0c\u65e0\u9700\u7528\u6237\u5e72\u9884\u3002<\/p>\n

3.scp\uff0c\u8fdc\u7a0b\u62f7\u8d1d\u7684\u5229\u5668<\/b><\/p>\n

\u62f7\u8d1d\u6587\u4ef6\u5230u\u76d8_\u62f7\u8d1d\u6587\u4ef6\u600e\u4e48\u64cd\u4f5c_linux \u6587\u4ef6\u62f7\u8d1d<\/p>\n

\u5728\u8fdb\u884c\u8de8Linux\u670d\u52a1\u5668\u6587\u4ef6\u590d\u5236\u65f6\uff0cSCP\u662f\u9996\u9009\u65b9\u6848\u3002\u4f5c\u4e3a\u201c\u5b89\u5168\u590d\u5236\u201d\u7684\u7f29\u5199\uff0cSCP\u672c\u8d28\u4e0a\u662f\u4e00\u6b3e\u4e13\u4e3a\u5b89\u5168\u4f20\u8f93\u8bbe\u8ba1\u7684\u6587\u4ef6\u62f7\u8d1d\u5de5\u5177\u3002<\/p>\n

SCP\u901a\u8fc7SSH\u534f\u8bae\u6267\u884c\u6587\u4ef6\u4f20\u8f93\uff0c\u786e\u4fdd\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u7684\u6570\u636e\u52a0\u5bc6linux\u7cfb\u7edf\u5b89\u88c5\uff0c\u4fdd\u969c\u6570\u636e\u514d\u906d\u9ed1\u5ba2\u7a83\u53d6\u3002\u5728\u9700\u4f20\u8f93\u5173\u952e\u6570\u636e\u7684\u60c5\u51b5\u4e0b\uff0c\u6b64\u52a0\u5bc6\u529f\u80fd\u6781\u5176\u5173\u952e\u3002<\/p>\n

SCP\u64cd\u4f5c\u7b80\u4fbf\u6613\u884c\u3002\u53ea\u9700\u5728\u547d\u4ee4\u884c\u6307\u4ee4\u4e2d\u952e\u5165\u201cscp\u6e90\u6587\u4ef6\u76ee\u6807\u5730\u5740\u201d\uff0c\u4fbf\u53ef\u8f7b\u677e\u5b9e\u73b0\u8fdc\u7a0b\u6587\u4ef6\u590d\u5236\u3002\u4f8b\u5982\uff0c\u82e5\u5c06\u672c\u5730\u6587\u4ef6\u4f20\u9012\u81f3\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\/home\/user\u8def\u5f84\uff0c\u6307\u4ee4\u5e94\u8f93\u5165\u201cscplocalfileuser@remotehost:\/home\/user\u201d\u3002<\/p>\n

4.\u6743\u9650\u95ee\u9898\uff0c\u62f7\u8d1d\u65f6\u7684\u5927\u5751<\/b><\/p>\n

linux \u6587\u4ef6\u62f7\u8d1d_\u62f7\u8d1d\u6587\u4ef6\u5230u\u76d8_\u62f7\u8d1d\u6587\u4ef6\u600e\u4e48\u64cd\u4f5c<\/p>\n

Linux\u73af\u5883\u4e0b\uff0c\u5bf9\u6587\u4ef6\u4e0e\u76ee\u5f55\u7684\u6743\u9650\u63a7\u5236\u6781\u4e3a\u4e25\u683c\u3002\u82e5\u5728\u6587\u4ef6\u590d\u5236\u8fc7\u7a0b\u4e2d\u672a\u7559\u610f\u6743\u9650\u8bbe\u7f6e\uff0c\u6781\u6613\u9677\u5165\u6743\u9650\u76f8\u5173\u7684\u56f0\u5883\u3002<\/p>\n

\u6587\u4ef6\u590d\u5236\u8fc7\u7a0b\u4e2d\uff0c\u76ee\u6807\u6587\u4ef6\u7684\u6743\u9650\u5e38\u4e0e\u6e90\u6587\u4ef6\u76f8\u540c\u3002\u5982\u62f7\u8d1d\u4ec5\u4f9broot\u7528\u6237\u8bfb\u5199\u6743\u9650\u7684\u6587\u4ef6\uff0c\u76ee\u6807\u6587\u4ef6\u5c06\u627f\u88ad\u6b64\u6743\u9650\u3002\u975eroot\u7528\u6237\u5c06\u65e0\u6cd5\u8bbf\u95ee\u6b64\u7c7b\u6587\u4ef6\uff0c\u60c5\u5f62\u9887\u4e3a\u5c34\u5c2c\u3002<\/p>\n

\u672a\u542f\u7528\u9012\u5f52\u62f7\u8d1d\u9009\u9879\uff08-r\uff09\u65f6\uff0c\u6587\u4ef6\u5939\u53ca\u5176\u5b50\u9879\u7684\u6743\u9650\u53ef\u80fd\u906d\u53d7\u635f\u5bb3\uff0c\u4f7f\u5f97\u76ee\u6807\u6587\u4ef6\u5939\u4e2d\u7684\u67d0\u4e9b\u6587\u4ef6\u65e0\u6cd5\u8bbf\u95ee\u6216\u5220\u9664\u3002\u4e3a\u786e\u4fdd\u6743\u9650\u6b63\u786e\u4f20\u8f93\uff0c\u8bf7\u52a1\u5fc5\u5728\u62f7\u8d1d\u65f6\u5305\u542b-r\u9009\u9879\u3002<\/p>\n

5.\u7b26\u53f7\u94fe\u63a5\uff0c\u62f7\u8d1d\u65f6\u7684\u9690\u5f62\u6740\u624b<\/b><\/p>\n

linux \u6587\u4ef6\u62f7\u8d1d_\u62f7\u8d1d\u6587\u4ef6\u5230u\u76d8_\u62f7\u8d1d\u6587\u4ef6\u600e\u4e48\u64cd\u4f5c<\/p>\n

Linux\u7cfb\u7edf\u4e2d\uff0c\u7b26\u53f7\u94fe\u63a5\uff08symboliclink\uff09\u867d\u5177\u9ad8\u6548\u76ca\uff0c\u5374\u53ef\u80fd\u5728\u6587\u4ef6\u62f7\u8d1d\u8fc7\u7a0b\u4e2d\u6f5c\u85cf\u98ce\u9669\u3002<\/p>\n

\u5f53\u6267\u884ccp\u547d\u4ee4\u5bf9\u7b26\u53f7\u94fe\u63a5\u8fdb\u884c\u590d\u5236\u65f6\uff0c\u5176\u9ed8\u8ba4\u884c\u4e3a\u662f\u62f7\u8d1d\u94fe\u63a5\u6240\u6307\u5411\u7684\u6587\u4ef6\uff0c\u800c\u975e\u94fe\u63a5\u81ea\u8eab\u3002\u6b64\u64cd\u4f5c\u53ef\u80fd\u5bfc\u81f4\u5bf9\u6307\u5411\u5173\u952e\u6587\u4ef6\u7684\u94fe\u63a5\u8fdb\u884c\u590d\u5236\u65f6\u610f\u5916\u8986\u76d6\u8be5\u5173\u952e\u6587\u4ef6\uff0c\u5176\u540e\u679c\u53ef\u80fd\u4e25\u91cd\u3002<\/p>\n

rsync\u590d\u5236\u7b26\u53f7\u94fe\u63a5\u9075\u5faa\u7279\u5b9a\u51c6\u5219\u3002\u6807\u51c6\u914d\u7f6e\u4e0b\uff0c\u8be5\u5de5\u5177\u590d\u5236\u7684\u662f\u76ee\u6807\u6587\u4ef6\u800c\u975e\u7b26\u53f7\u94fe\u63a5\u3002\u542f\u7528-l\u9009\u9879\u65f6\uff0crsync\u5219\u76f4\u63a5\u62f7\u8d1d\u94fe\u63a5\u81ea\u8eab\uff0c\u800c\u975e\u5176\u6240\u6307\u5411\u7684\u6587\u4ef6\u3002\u6b64\u9009\u9879\u867d\u5728\u7279\u5b9a\u573a\u5408\u9887\u6709\u76ca\u5904\uff0c\u5374\u4e5f\u53ef\u80fd\u5f15\u53d1\u610f\u5916\u95ee\u9898\u3002<\/p>\n

6.\u6587\u4ef6\u5c5e\u6027\u548c\u5143\u6570\u636e\uff0c\u62f7\u8d1d\u65f6\u7684\u5c0f\u7ec6\u8282<\/b><\/p>\n

\u62f7\u8d1d\u6587\u4ef6\u5230u\u76d8_\u62f7\u8d1d\u6587\u4ef6\u600e\u4e48\u64cd\u4f5c_linux \u6587\u4ef6\u62f7\u8d1d<\/p>\n

\u4e8eLinux\u64cd\u4f5c\u7cfb\u7edf\uff0c\u6587\u4ef6\u4e0d\u4ec5\u4e3a\u6570\u636e\u5757\uff0c\u4ea6\u5305\u542b\u4e86\u4f17\u591a\u5c5e\u6027\u4e0e\u5143\u4fe1\u606f\uff0c\u4f8b\u5982\u521b\u5efa\u65e5\u671f\u3001\u4fee\u6539\u65e5\u671f\u3001\u6240\u6709\u6743\u3001\u6743\u9650\u7b49\u3002\u6b64\u7c7b\u5c5e\u6027\u4e0e\u5143\u4fe1\u606f\u5728\u6587\u4ef6\u590d\u5236\u8fc7\u7a0b\u4e2d\u5c24\u9700\u7ec6\u5fc3\u5904\u7406\u3002<\/p>\n

\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0ccp\u547d\u4ee4\u590d\u5236\u6587\u4ef6\u65f6\u4fdd\u7559\u6e90\u6587\u4ef6\u7684\u5c5e\u6027\u548c\u5143\u6570\u636e\uff0c\u5305\u62ec\u521b\u5efa\u65f6\u95f4\u3001\u4fee\u6539\u65f6\u95f4\u3001\u6240\u6709\u6743\u53ca\u6743\u9650\u3002\u867d\u7136\u8fd9\u5728\u5e38\u89c4\u64cd\u4f5c\u4e2d\u5229\u5927\u4e8e\u5f0alinux \u6587\u4ef6\u62f7\u8d1d<\/strong>\uff0c\u4f46\u4ea6\u53ef\u80fd\u5f15\u53d1\u95ee\u9898\uff0c\u4f8b\u5982\uff0c\u5f53\u590d\u5236\u5177\u6709root\u6743\u9650\u8bbf\u95ee\u9650\u5236\u7684\u6587\u4ef6\u65f6\uff0c\u76ee\u6807\u6587\u4ef6\u5c06\u7ee7\u627f\u8fd9\u4e9b\u6743\u9650\uff0c\u8fdb\u800c\u5bfc\u81f4\u975eroot\u7528\u6237\u65e0\u6cd5\u8bbf\u95ee\u3002<\/p>\n

rsync\u5728\u8fdb\u884c\u6587\u4ef6\u590d\u5236\u65f6\u9075\u5faa\u7279\u5b9a\u51c6\u5219\u3002\u6309\u9ed8\u8ba4\u8bbe\u7f6e\uff0c\u8be5\u5de5\u5177\u4fdd\u7559\u539f\u6587\u4ef6\u7684\u5c5e\u6027\u4e0e\u5143\u6570\u636e\uff1b\u914d\u7f6e\u201c-X\u201d\u9009\u9879\u540e\uff0c\u5219\u5ffd\u7565\u5176\u6269\u5c55\u5c5e\u6027\u3002<\/p>\n

7.\u603b\u7ed3\u4e0e\u53cd\u601d<\/b><\/p>\n

Linux\u6587\u4ef6\u590d\u5236\u64cd\u4f5c\u8868\u9762\u76f4\u767d\uff0c\u5b9e\u5219\u5305\u542b\u590d\u6742\u6280\u5de7\u3002cp\u3001rsync\u53cascp\u7b49\u5de5\u5177\u5404\u6709\u4e13\u957f\u4e0e\u5e94\u7528\u73af\u5883\u3002\u4f7f\u7528\u65f6\uff0c\u52a1\u5fc5\u8be6\u9605\u76f8\u5173\u6587\u6863\uff0c\u6df1\u523b\u7406\u89e3\u5404\u81ea\u53c2\u6570\u4e0e\u884c\u4e3alinux\u89e3\u538brar\uff0c\u4ee5\u9632\u9677\u5165\u4f7f\u7528\u9677\u9631\u3002<\/p>\n

\u5728\u4f7f\u7528Linux\u6587\u4ef6\u590d\u5236\u8f6f\u4ef6\u8fc7\u7a0b\u4e2d\uff0c\u4f60\u906d\u9047\u8fc7\u54ea\u4e9b\u68d8\u624b\u7684\u96be\u9898\uff1f\u656c\u8bf7\u4e8e\u8bc4\u8bba\u533a\u5206\u4eab\u4f60\u7684\u906d\u9047\uff0c\u4fbf\u4e8e\u5171\u540c\u63a2\u8ba8\uff0c\u5171\u540c\u63d0\u5347\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u4f5c\u4e3a\u201c\u5b89\u5168\u590d\u5236\u201d\u7684\u7f29\u5199\uff0cSCP\u672c\u8d28\u4e0a\u662f\u4e00\u6b3e\u4e13\u4e3a\u5b89\u5168\u4f20\u8f93\u8bbe\u8ba1\u7684\u6587\u4ef6\u62f7\u8d1d\u5de5\u5177\u3002Linux\u7cfb\u7edf\u4e2d\uff0c\u7b26\u53f7\u94fe\u63a5\uff08symboliclink\uff09\u867d\u5177\u9ad8\u6548\u76ca\uff0c\u5374\u53ef\u80fd\u5728\u6587\u4ef6\u62f7\u8d1d\u8fc7\u7a0b\u4e2d\u6f5c\u85cf\u98ce\u9669\u3002\u5f53\u6267\u884ccp\u547d\u4ee4\u5bf9\u7b26\u53f7\u94fe\u63a5\u8fdb\u884c\u590d\u5236\u65f6\uff0c\u5176\u9ed8\u8ba4\u884c\u4e3a\u662f\u62f7\u8d1d\u94fe\u63a5\u6240\u6307\u5411\u7684\u6587\u4ef6\uff0c\u800c\u975e\u94fe\u63a5\u81ea\u8eab\u3002<\/p>\n","protected":false},"author":1,"featured_media":293214,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[1484,1245,3180,3240,1092],"class_list":["post-293213","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-r-6","tag-s-11","tag-wjfz","tag-qxwt","tag-cp"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/293213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=293213"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/293213\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/293214"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=293213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=293213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=293213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}