看板 Linux 關於我們 聯絡資訊
請教rsync如何只備份某目錄下「檔案」,不備份子目錄嗎? ex: /path1/ABC/file1 /path1/ABC/file2 /path1/ABC/file3 /path1/ABC/.hide_file_name4 /path1/ABC/folder5 /path1/ABC/folder6 想 rsync copy 完整備份 file1/2/3/.hide_file_name4 到同一個檔案系統中的 /path2/CDE/file1 /path2/CDE/file2 /path2/CDE/file3 /path2/CDE/.hide_file_name4 但是不備份 folder5/6 請問指令要怎麼下呢?或是有除了 rsync 外,可以在 background 跑的方法? cp -p * 好像可以不 copy folder , 可是會一直要等輸入 yes 確認不要 copy folder...XD -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.80.144.33 ※ 文章網址: http://www.ptt.cc/bbs/Linux/M.1398705793.A.4B9.html
sppmg:find -type f <--- 方法之一,應該有更好的 04/29 01:38
sppmg:上面錯... 還要配合 depth 04/29 01:40
jokester:rsync ABC/* ABC/.* 這樣可以嗎 不加-r不會復制目錄 04/29 09:55