NOTE: dd command? ================================================================================= dd command當中的"dd",是什麼意思,有以下說法: * "Data Duplicator"(數據複製器) * "Disk Dump"(磁碟轉儲) * "Destroy Disk"(摧毀磁碟,因為錯誤使用可能會導致數據丟失) 由上可知,dd command可以用在: * 備份資料 * 還原資料至目標儲存空間(轉儲) * 透過將每個位元寫入空值的方式,將資料損毀 以下就是針對不同需求所製作的筆記 Create OS image --------------------------------------------------------------------------------- ### 透過**lsblk**找到目標硬碟,在將內部資料(作業系統)做成映像(image)備份 Command: `lsblk`  ### 先使用**fdisk**指令,計算製作image file的大小 Command: `fdisk -l`  存入空間由**start**起始,終於**End**,所以輸入大小為**23175167** ### 使用**dd command + time**製作image並計算時間 Command: `time if=/dev/sdX of=example.img bs=512 status=progress count=23175167`  Result:  Restore OS image to Disk --------------------------------------------------------------------------------- 將image還原至USB command: `time dd if=<image_file> of=/dev/sdX status=progress`  Wipe all data in Disk --------------------------------------------------------------------------------- (將整顆硬碟的資料透過寫入zero抹除,時間會偏久) Command: `time dd if=/dev/zero of=/dev/sdX bs=512 status=progress`  Ref. --------------------------------------------------------------------------------- [dd command info](https://blog.gtwang.org/linux/dd-command-examples/) [Securely Wipe Disks and Delete Files](https://brainfucksec.github.io/securely-wipe-disks-and-delete-files)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up