Re: [問題] 資料複製的問題

看板Linux作者 (小惡魔)時間17年前 (2009/01/07 02:01), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串2/3 (看更多)
※ 引述《mochii (麻糬)》之銘言: : 假設要把分割區sda1內的檔案和資料夾都複製到sdc1 : 還要保留檔案權限等等資訊 : 要用哪些指令比較適合阿? : 剛剛用過dd拷貝 : 結果發現因為sda1(100G)和sdc1(200G)大小不同 : copy完sdc1分割變成和sda1大小一樣了 @@ cp 就可以了 man cp -p Cause cp to preserve the following attributes of each source file in the copy: modification time, access time, file flags, file mode, user ID, and group ID, as allowed by permissions. cp -Rpv /sda1/* /sdc1/ 這樣就可以了 或者是 切換到 sdc1 資料夾 tar -cvf - /sda1 | tar -xvf - -- Appleboy Blog: http://blog.Wu-Boy.com Appleboy Life: http://life.wu-boy.com -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.123.107.20 ※ 編輯: appleboy46 來自: 140.123.107.20 (01/07 02:04)

01/07 02:12, , 1F
thx
01/07 02:12, 1F

01/07 11:43, , 2F
cp -a不是更快 :p
01/07 11:43, 2F
文章代碼(AID): #19OvnZHz (Linux)
文章代碼(AID): #19OvnZHz (Linux)