English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Linux dd command is used to read, convert, and output data.
dd can read data from standard input or file, convert data according to the specified format, and then output to file, device, or standard output.
Parameter description:
To create a bootable disk in Linux, you can use the following command:
dd if=boot.img of=/dev/fd0 bs=1440k
Convert all the English letters in the testfile file to uppercase and then convert to testfile_1Use the following command in the command prompt:
dd if=testfile_2 of=testfile_1 conv=ucase
where testfile_2 The content is:
$ cat testfile_2 #testfile_2content HELLO LINUX! Linux is a free unix-type operating system. This is a linux testfile! Linux test
After the conversion is complete, testfile_1 The content is as follows:
$ dd if=testfile_2 of=testfile_1 conv=ucase #Using the dd command, case conversion recorded 0+1 of the input Recorded 0+1 of the output 95bytes (95 B) Copied, 0.000131446 seconds,723 KB/s cmd@hdd-desktop:~$ cat testfile_1 #View the converted testfile_1File Content HELLO LINUX! LINUX IS A FREE UNIX-TYPE OPERATING SYSTEM. THIS IS A LINUX TESTFILE! LINUX TEST #testfile_2All characters have been converted to uppercase letters
The string read from the standard input device is converted to uppercase and then output to the standard output device, using the command:
dd conv=ucase
Press Enter after entering the above command, enter a string, and then press Enter again, and press the combination key Ctrl+D Exit, the following result appears:
$ dd conv=ucase Hello Linux! #Press the Enter key after entering the string HELLO LINUX! #Press the combination key Ctrl+D Exit, convert the result to uppercase Recorded 0+1 of the input Recorded 0+1 of the output 13bytes (13 B) Copied,12.1558 seconds, 0.0 KB/s