coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dd: what is iflag=directory for?


From: Bernhard Voelker
Subject: dd: what is iflag=directory for?
Date: Sat, 23 Aug 2014 02:19:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

With iflag=directory ...

    `directory'
          Fail unless the file is a directory.  Most operating systems
          do not allow I/O to a directory, so this flag has limited
          utility.

... dd(1) would fail if the input file is _not_ a directory:

  $ src/dd iflag=directory if=src/dd
  src/dd: failed to open ‘src/dd’: Not a directory

And on Linux, read(2)ing from a directory fails:

  src/dd iflag=directory if=. status=none
  src/dd: error reading ‘.’: Is a directory

So my questions (forwarded from a downstream ML):

a) on which systems is read(2)ing from a directory supported?
IIRC HP-UX?

b) when 'dd if=DIR' is successful, what would be the output?
Is it useful to write it e.g. to 'of=DIR2'?

Thanks & have a nice day,
Berny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]