[clug] 'dd' command detecting EOF: an example script
sjenkin at canb.auug.org.au
Wed May 15 06:58:16 UTC 2019
It seems GNU dd have added a side-effect with ‘direct’ - it has a non-zero return on EOF, which was my complaint.
Or GN did it right…
PS: On Debian Jessie, dd (coreutils) 8.23, I get this error. (‘direct’ is supported)
> dd: setting flags for ‘standard input’: Invalid argument
> On 15 May 2019, at 12:25, David Deaves <David.Deaves at dd.id.au> wrote:
> Using iflag=direct seems to do what you want, as long as the input is a file (doesn't work
> for a pipe, not sure about networked file...).
> while dd count=32 bs=1k of=part_$i iflag=direct
> let i++
> ) < ~/somefile
> Dave !
Steve Jenkin, IT Systems and Design
0412 786 915 (+61 412 786 915)
PO Box 38, Kippax ACT 2615, AUSTRALIA
mailto:sjenkin at canb.auug.org.au http://members.tip.net.au/~sjenkin
More information about the linux