Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏

第 28 章 进制转换 - 16进制 - 8进制 - 二进制

目录

28.1. od - dump files in octal and other formats
28.1.1. 16进制
28.1.2. 使用 od 随机生成密码
28.2. hexdump, hd -- ASCII, decimal, hexadecimal, octal dump
28.3. xxd - make a hexdump or do the reverse.
28.3.1. 指定每行的列数
28.3.2. 跳过字节
28.4. binutils
28.4.1. strings - print the strings of printable characters in files.

28.1. od - dump files in octal and other formats

28.1.1. 16进制

			
neo@netkiller ~ % echo "helloworld" | od -x
0000000      6568    6c6c    776f    726f    646c    000a                
0000013

neo@netkiller ~ % echo "helloworld" | od -x -An
             6568    6c6c    776f    726f    646c    000a  			
			
			

28.1.2. 使用 od 随机生成密码

			
neo@netkiller ~ % od  -vN 32 -An -tx1 /dev/urandom | tr -d ' \n'
a6bf6dad8ed860a234046b66d550008f61c36e9cb2630c22d935dac5e20d7920