![]() ![]() The Line Feed character is added by echo. The hexadecimal value of 0A is used to represent the Line Feed character, which cannot be shown as an alphanumeric character, so it’s shown as a period (.) instead. The hexadecimal value of 31 is used to represent the digit one. The right-hand portion of the output depicts these values as alphanumeric characters, wherever possible. The output shows us that, beginning at offset 00000000 in the file, there’s a byte that contains a hexadecimal value of 31, and a one that contains a hexadecimal value of 0A. We’ll also use the -C (canonical) option to force the output to show hexadecimal values in the body of the output, as well as their alphanumeric character equivalents: hexdump -C geek.txt We’ll use the hexdump command, which will give us an exact byte count and allow us to “see” non-printing characters as hexadecimal values. ![]() ![]() Why is it two bytes when we only sent one character to the file? Let’s take a look at what’s happening inside the file. The length is the numeric value that follows the dave dave entries, which is two bytes. Now, we’ll use the long format listing, ls, to look at the file length: ls -l geek.txt ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |