| The 12 Days of dd: Day Nine | | Print | |
| Written by Jason Briody | |||
| Friday, 02 January 2009 00:00 | |||
|
On the ninth day of dd, we perform file conversions with dd. Ever wanted to convert the format or content of an entire file? Depending on the circumstances, dd might be able to help. There are a number of seldom-used conversion (“conv”) options that dd offers, including: You can test out the functionality of dd’s conv very easily by creating a new text file (“myfile1”) in your present working directory, opening it, and typing: i typed this in lowercase. Save it, then do a quick conversion on the file to change the case of the characters by typing the following at a command line: # dd if=myfile1 of=myfile2 conv=ucase Hit enter, then open myfile2. It should read: I TYPED THIS IN LOWERCASE. dd successfully converted the lowercase ASCII alphabetic characters in myfile1 to uppercase in myfile2. Try out the other conv options and see what you come up with!
|


