看板 Linux 關於我們 聯絡資訊
※ 引述《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)
mochii:thx 01/07 02:12
Adama:cp -a不是更快 :p 01/07 11:43