| Summary: | dd.1 manpage and dd behavior mismatch | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Documentation | Reporter: | Giorgos Keramidas <keramida> | ||||
| Component: | Books & Articles | Assignee: | freebsd-doc (Nobody) <doc> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Latest | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
Responsible Changed From-To: gnats-admin->freebsd-doc Misfiled PR State Changed From-To: open->closed Committed, thanks! |
The manpage of dd(1) states incorrectly that: "Where sizes are specified, a decimal number of bytes is expected." But dd can accept octals and hexadecimals too, like 011 or 0xa, and work as expected. It even works correctly with hexadecimals separated by 'x' to indicate multiplication! How-To-Repeat: # transferring 10 bytes with octal numbers dd if=/dev/zero of=/dev/null bs=1 count=012 dd if=/dev/zero of=/dev/null bs=012 count=1 # transferring 10 bytes with hexadecimal numbers dd if=/dev/zero of=/dev/null bs=0xa count=1 dd if=/dev/zero of=/dev/null bs=1 count=0xa # hexadecimals and 'x' for multiplication dd if=/dev/zero of=/dev/null bs=1x0xa count=1 dd if=/dev/zero of=/dev/null bs=1 count=1x0xa