dd's Examples

it is used to convert and copy files.

dd if+/dev/sda of=/dev/sdb

the given is converted to upper case letters.

$ dd conv=ucase
how are you?

copies the files from file1 to file2 and converts fonts of the string

dd if=file1 of=file2 conv=ucase

copies the files from file1 to file2 and converts fonts of the string

dd if=file1 of=file2 conv=ucase

swap each pair of input bytes woth each other

dd if=file1 of=file2 conv=swab

 the requirement is that the dd command shouldn't do anything when the output file already exists, then this condition can be enforced using the excl value for the conv option

dd if=file1 of=file3 conv=excl

dd just overwrites the output file .to append the text instead, use the value append for oflag FLAG and notrunc for conv option.

dd if=file1 of=file3 oflag=append conv=notrunc

it can also force dd command to not create output if the give file already does not exist.

dd if=file1 of=file3 conv=nocreat

The level of information to print to stderr 'none' suppress level  of information to print to stderr none suppresses everything but error messages,  noxfer suppresses  the  final transfer  statistics, progress shows periodic transfer statistics

 

dd if=file1 of=file3 status=none

converts the give sentence to lower case 

$ dd conv=lcase 
HELLO EVERYONE

DevOpsSchool
Typically replies within an hour

DevOpsSchool
Hi there 👋

How can I help you?
×
Chat with Us