4 ms·
How does this work? Looks like a bug in xxd for me (o.O)
by ktpsns 7y ago
How does this work? Looks like a bug in xxd for me (o.O)
- mzs 7y agoNope xxd is fine, read the man page. $ PAGER='col -bx' man 5 cpio | awk '$1 == "mode" { print; while (getline) print }' | head mode The mode specifies both the regular permissions and the file type. It consists of several bit fields as follows: 0170000 This masks the file type bits. 0140000 File type value for sockets. 0120000 File type value for symbolic links. For symbolic links, the link body is stored as file data. 0100000 File type value for regular files. 0060000 File type value for block special devices. 0040000 File type value for directories. 0020000 File type value for character special devices. $ echo /dev/urandom | cpio -o | dd bs=6 skip=3 count=1 | od -tc 1 block 1+0 records in 1+0 records out 6 bytes transferred in 0.000025 secs (239675 bytes/sec) 0000000 0 2 0 6 6 6 0000006