dcfldd(1)
π dcfldd(1) β enhanced version of dd for forensics and security π
okay bestie, buckle UP, because this is the manual page for dcfldd, section 1 of the manual. it's giving "dd but she went to therapy and got a glow-up". let's go π¦
β¨ NAME β¨
dcfldd β enhanced version of dd for forensics and security
β¨ SYNOPSIS β¨
dcfldd [OPTION]...
like. that's it. that's the whole vibe. options only, no positional nonsense. periodt π
β¨ DESCRIPTION β¨
Copy a file, converting and formatting according to the options. classic dd energy, but make it forensic π₯
dcfldd was initially developed at Department of Defense Computer Forensics Lab (DCFL). This tool is based on the dd program with the following additional features:
- Hashing on-the-fly:
dcflddcan hash the input data as it is being transferred, helping to ensure data integrity. no cap, it's checking the vibe of your bytes while they travel π«Ά - Status output:
dcflddcan update the user of its progress in terms of the amount of data transferred and how much longer operation will take. she's keeping you posted, bestie, no mystery loading bars here β¨ - Flexible disk wipes:
dcflddcan be used to wipe disks quickly and with a known pattern if desired. - Image/wipe verify:
dcflddcan verify that a target drive is a bit-for-bit match of the specified input file or pattern. bit-for-bit. she does not do "close enough" π - Multiple outputs:
dcflddcan output to multiple files or disks at the same time. - Split output:
dcflddcan split output to multiple files with more configurability than thesplitcommand. - Piped output and logs:
dcflddcan send all its log data and output to commands as well as files natively. - When
dduses a default block size (bs,ibs,obs) of 512 bytes,dcfldduses 32768 bytes (32 KiB) which is HUGELY more efficient. (their caps, and honestly? correct of them π) - The following options are present in
dcflddbut not indd:ALGORITHMlog:,errlog,hash,hashconv,hashformat,hashlog,hashlog:,hashwindow,limit,of:,pattern,sizeprobe,split,splitformat,statusinterval,textpattern,totalhashformat,verifylog,verifylog:,vf. that's the whole exclusive guest list, iykyk π
dcfldd supports the following letters to specify amount of data: k for kilo, M for Mega, G for Giga, T for Tera, P for Peta, E for Exa, Z for Zetta and Y for Yotta. E.g. 10M is equal to 10 MiB. See the BLOCKS AND BYTES section to get other possibilities.
β¨ OPTIONS β¨
bs=BYTESβ Forceibs=BYTESandobs=BYTES. Default value is32768(32KiB). See BLOCKS AND BYTES section. Warning: the block size will be created in RAM. Make sure you have sufficient amount of free memory. she is HUNGRY for RAM, feed her or she will suffer πcbs=BYTESβ ConvertBYTESbytes at a time. (see BLOCKS AND BYTES section)conv=KEYWORDSβ Convert the file as per the comma separated keyword list.count=BLOCKSβ Copy onlyBLOCKSinput blocks. (see BLOCKS AND BYTES section)limit=BYTESβ Similar tocountbut usingBYTESinstead ofBLOCKS. (see BLOCKS AND BYTES section)ibs=BYTESβ ReadBYTESbytes at a time. (see BLOCKS AND BYTES section)if=FILEβ Read fromFILEinstead of stdin. (see BLOCKS AND BYTES section)obs=BYTESβ WriteBYTESbytes at a time. (see BLOCKS AND BYTES section)of=FILEβ Write toFILEinstead of stdout. NOTE:of=FILEmay be used several times to write output to multiple files simultaneously. she's a multitasker, she contains multitudes πof:=COMMANDβ Exec and write output to processCOMMAND.seek=BLOCKSβ SkipBLOCKSobs-sized blocks at start of output. (see BLOCKS AND BYTES section)skip=BLOCKSβ SkipBLOCKSibs-sized blocks at start of input. (see BLOCKS AND BYTES section)pattern=HEXβ Use the specified binary pattern as input. You can use a byte only.textpattern=TEXTβ Use repeatingTEXTas input. You can use a character only.errlog=FILEβ Send error messages toFILEas well as stderr.hash=NAMEβ Do hash calculation in parallel with the disk reading. Eithermd5,sha1,sha256,sha384orsha512can be used. Default algorithm ismd5. To select multiple algorithms to run simultaneously enter the names in a comma separated list. multiple hashes at once?? she said "why choose" πhashlog=FILEβ Send hash output toFILEinstead of stderr. If you are using multiple hash algorithms you can send each to a separate file using the conventionALGORITHMlog=FILE, for examplemd5log=FILE1,sha1log=FILE2, etc.hashwindow=BYTESβ Perform a hash on everyBYTESamount of data. The partial results will be shown in screen. The default hash ismd5but you can usehash=option to choose other.hashlog:=COMMANDβ Exec and write hashlog to processCOMMAND.ALGORITHMlog:=COMMANDβ Also works in the same fashion ofhashlog:=COMMAND.hashconv=[before|after]β Perform the hashing before or after the conversions.hashformat=FORMATβ Display each hashwindow according toFORMATthe hash format mini-language is described below.totalhashformat=FORMATβ Display the total hash value according toFORMATthe hash format mini-language is described below.status=[on|off]β Display a continual status message on stderr. Default state is"on".statusinterval=Nβ Update the status message everyNblocks. Default value is256.sizeprobe=[if|of|BYTES]β Determine the size of the input or output file or an amount ofBYTESfor use with status messages. This option gives you a percentage indicator around thesizeprobevalue. WARNING: do not use this option against a tape device. (see BLOCKS AND BYTES section) seriously bestie, tape + sizeprobe = chaos, do NOT πsplit=BYTESβ Write everyBYTESamount of data to a new file. This operation applies to anyof=FILEthat follows (split=must be put beforeof=). (see BLOCKS AND BYTES section) order matters, she is a little particular like that πsplitformat=[TEXT|MAC|WIN]β The file extension format for split operation. You may use"a"for letters and"n"for numbers. If you useannn, an extension started asa000will be appended; the last possible extension for this format will bez999.splitformat=anwill providea0,a1,a2,a3,a4,a5,a6,a7,a8,a9,b0,b1,b2,b3... If nothing is specified the default format is"nnn". NOTE: thesplitandsplitformatoptions take effect only for output files (optionof=) specified AFTER these options appear in the command line (e.g.split=50M splitformat=annn of=/tmp/test.iso). Likewise, you may specify it several times for different output files within the same command line. You may use as many digits in any combination you would like. E.g."anaannnaana"would be valid, but a quite insane (see BLOCKS AND BYTES section). Other possible approach isMAC. If"MAC"is used, a suffixdmgand severaldmgpartwill be appended. In other words, it will generate a partial disk image file, used by the Mac OS X operating system.dmgpartfiles are usually provided with a correspondingdmgfile, which is the master file for the split archive. Ifdmgis opened in Mac OS X, alldmgpartwill be read too. The last option isWIN, which will automatically output file naming offoo.001,foo.002, ...,foo.999,foo.1000, .... three whole naming eras, pick your fighter πΈvf=FILEβ Verify thatFILEmatches the specified input.verifylog=FILEβ Send verify results toFILEinstead of stderr.verifylog:=COMMANDβ Exec and write verify results to processCOMMAND.diffwr=[on|off]β Only write to output if destination block content differs. This operation applies to anyof=FILEthat follows (diffwr=must be put before anyof=). she's not gonna rewrite what's already there, she has STANDARDS π--helpβ Display a help page and exit.--versionβ Output version information and exit.
β¨ BLOCKS AND BYTES β¨
BLOCKS and BYTES may be followed by the following multiplicative suffixes: xM M, c 1, w 2, b 512, kD 1000, k 1024, MD 1,000,000, M 1,048,576, GD 1,000,000,000, G 1,073,741,824, and so on for T, P, E, Z, Y.
lowkey memorize these, they show up EVERYWHERE in this page π§
β¨ KEYWORDS β¨
Each KEYWORD may be:
asciiβ From EBCDIC to ASCII.ebcdicβ From ASCII to EBCDIC.ibmβ From ASCII to alternated EBCDIC.blockβ Pad newline-terminated records with spaces to cbs-size.unblockβ Replace trailing spaces in cbs-size records with newline.lcaseβ Change upper case to lower case.notruncβ Do not truncate the output file.ucaseβ Change lower case to upper case.swabβ Swap every pair of input bytes.noerrorβ Continue after read errors.syncβ Pad every input block with NULs to ibs-size. When used withblockorunblock, pad with spaces rather than NULs.
β¨ FORMAT β¨
The structure of FORMAT may contain any valid text and special variables. The built-in variables are the following format: #variable_name#. To pass FORMAT strings to the program from a command line, it may be
necessary to surround your FORMAT strings with "quotes."
The built-in variables are listed below:
window_startβ The beginning byte offset of the hashwindow.window_endβ The ending byte offset of the hashwindow.block_startβ The beginning block (by input blocksize) of the window.block_endβ The ending block (by input blocksize) of the hash window.hashβ The hash value.algorithmβ The name of the hash algorithm.
For example, the default FORMAT for hashformat and totalhashformat are:
hashformat="#window_start# - #window_end#: #hash#" totalhashformat="Total (#algorithm#): #hash#"
The FORMAT structure accepts the following escape codes:
\nβ Newline\tβ Tab\rβ Carriage return\β Insert the\character##β Insert the#character as text, not a variable
and that's where part 1 wraps, bestie β but we are NOT done, keep scrolling, there's more π
π EXAMPLES π
okay bestie this is the part where it gets fun. every single one of these lines below makes a 100 MiB file that's just... zeros. pure void energy. nothing but 0s, iconic behaviour honestly:
$ dcfldd if=/dev/zero of=test bs=1M count=100
$ dcfldd if=/dev/zero of=test bs=100M count=1
$ dcfldd if=/dev/zero of=test bs=50M count=2
$ dcfldd if=/dev/zero of=test limit=100M
like, four different ways to say the exact same thing and they ALL slay π
now the forensics moment. you wanna make a copy (forensics image) from a disk called /dev/sdb into a file, and you want input/output blocks of 4096 bytes (that's 4 KiB, tiny lil baby blocks) instead of the default 32 KiB:
$ dcfldd if=/dev/sdb bs=4096 of=sdb.img
and NOW we level up π§ same as the last one, but we're also calculating MD5 and SHA256 hashes and dropping the results into sdb.md5 and sdb.sha256. this is so useful for forensics work because the hashes get processed in real time β no wasting time doing some clunky dd + md5 + sha256 combo. think about it: I/O disk is very slow, RAM is very fast, so the hashes get calculated bit per bit in memory when the next portion of the disk is read. once the whole disk has been read, all the hashes are ready. no cap, it's just efficient like that β¨
$ dcfldd if=/dev/sdb bs=4096 hash=md5,sha256 md5log=sdb.md5 sha256log=sdb.sha256 of=sdb.img
wanna validate the image file against the original source? say less:
$ dcfldd if=/dev/sdb vf=sdb.img
splitting the image into 500 MiB slices, using the default bs value (32 KiB). but heads up bestie β split= has to be put before of= for it to work. order matters, the universe is picky like that π
$ dcfldd if=/dev/sdb split=500M of=sdb.img
taking that last example but using a0000 up to z9999 as the suffix for each split file:
$ dcfldd if=/dev/sdb split=500M splitformat=annnn of=sdb.img
okay this next one is genuinely main character energy π dcfldd will work byte per byte (bs=1) and hop 1056087439 bytes. after that it'll collect 200000 bytes and write the results into a file called airplane.jpg:
$ dcfldd if=/dev/sda3 bs=1 skip=1056087439 count=200000 of=airplane.jpg
and in that last example, you could get the exact same result using limit instead of count. the big difference? count uses 200000*bs, while limit uses 200000 bytes β regardless of whatever value you declared in the bs option. subtle but important, iykyk:
$ dcfldd if=/dev/sda3 bs=1 skip=1056087439 limit=200000 of=airplane.jpg
wanna write something inside a file? that's what seek is for π say you wanna write a message from a file called message.txt into a file called target.iso, hopping 200000 bytes from the start of the file:
$ dcfldd if=message.txt bs=1 seek=200000 of=target.iso
dcfldd can also hand a result off to be processed by an external command. sending it, bestie π¬:
$ dcfldd if=text.txt of:="cat | sort -u"
converting a file from ASCII to EBCDIC:
$ dcfldd if=text.asc conv=ebcdic of=text.ebcdic
and converting it right back from EBCDIC to ASCII:
$ dcfldd if=text.ebcdic conv=ascii of=text.asc
π¦ SEE ALSO π¦
π REPORTING BUGS π
found a bug? don't suffer in silence, tell the devs! report bugs at https://github.com/resurrecting-open-source-projects/dcfldd/issues
π AUTHORS π
dcfldd was originally written by Nicholas Harbour. currently it's maintained by some volunteers (the real ones, fr fr π«Ά).
GNU dd was written by Paul Rubin, David MacKenzie and Stuart Kemp.
this manpage was written by dd authors, Nicholas Harbour, Joao Eriberto Mota Filho and others.
and that's the whole page babes, you made it to the end π this was dcfldd-1.9.3, dated 01 May 2025, and yes we're closing out dcfldd(1) together like the icons we are. go make some forensics images, stay hydrated, and remember: hash everything twice πβ¨
π¦ where this page comes from
- fedora 43: dcfldd 1.9.3-1.fc43 Β· GPL-2.0-or-later AND LicenseRef-Callaway-BSD AND LicenseRef-Callaway-Copyright-only
- fedora 44: dcfldd 1.9.3-3.fc44 Β· GPL-2.0-or-later AND LicenseRef-Callaway-BSD AND LicenseRef-Callaway-Copyright-only
- nixos 26.05: dcfldd 1.9.3
- nixpkgs unstable: dcfldd 1.9.3
- ubuntu questing: dcfldd 1.9.3-1
- ubuntu resolute: dcfldd 1.9.3-2 Β· GPL-2.0-or-later
- ubuntu stonking: dcfldd 1.9.3-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms