Forrest logo
back to the dcfldd tool

dcfldd:tldr:1fbd5

dcfldd: Copy a disk to a raw image file and hash the image using SHA256.
$ dcfldd if=/dev/${disk_device} of=${file-img} hash=sha256 hashlog=${file-hash}
try on your machine

This command is using the tool dcfldd to compute the SHA256 hash of a disk device and generate a hash log.

Let's break down the command and explain each component:

  • dcfldd: This is the command to run the dcfldd tool, which is a enhanced version of dd (data duplicator) with additional features.
  • if=/dev/${disk_device}: This specifies the input file or device. In this case, /dev/${disk_device} represents the disk device you want to create an image of.
  • of=${file-img}: This specifies the output file. ${file-img} represents the filename or path where the output (disk image) will be saved.
  • hash=sha256: This option tells dcfldd to compute the SHA256 hash of the input file or device.
  • hashlog=${file-hash}: This specifies the hash log file. ${file-hash} represents the filename or path where the hash log will be saved.

So when you run this command, dcfldd will read the data from the specified disk device (/dev/${disk_device}), create an image of it, compute the SHA256 hash of the image, and save the hash value in the specified hash log file (${file-hash}).

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the dcfldd tool