"dd conv=unblock" always add a new line in Red Hat Enterprise Linux 7

Solution Verified - Updated -

Issue

  • The behavior of dd conv=unblock is different between RHEL5 and 7.
  • "dd conv=unblock" always add a new line in Red Hat Enterprise Linux 7

    (RHEL5)

    $ dd --version
    dd (coreutils) 5.97
    ...
    
    $ echo -n a | dd cbs=600 conv=unblock
    a0+1 record in
    0+1 record out
    1 bytes (1 B) copied, 0.00137652 s, 0.7kB/s
    
    $ echo -n a | dd cbs=600 conv=unblock 2> /dev/null | hexdump -C
    00000000  61                                                |a|
    00000001
    

    (RHEL7)

    $ dd --version
    dd (coreutils) 8.22
    ...
    
    $ echo -n a | dd cbs=600 conv=unblock
    a
    0+1 record in
    0+1 record out
    2 bytes (2 B) copied, 0.0013602 s, 1.5kB/s
    
    $ echo -n a | dd cbs=600 conv=unblock 2> /dev/null | hexdump -C
    00000000  61 0a                                             |a.|
    00000002
    

Environment

  • Red Hat Enterprise Linux 7
  • coreutils

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content