[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dd new iflag= oflag= flags directory, nolinks
From: |
Paul Eggert |
Subject: |
Re: dd new iflag= oflag= flags directory, nolinks |
Date: |
Tue, 07 Mar 2006 08:14:05 -0000 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Phillip Susi <address@hidden> writes:
> You can't open() and write() to a directory, so how does it make
> any sense to ask dd to set O_DIRECTORY?
You can open a directory without writing to it. Something like this:
$ mkdir foo
$ dd if=foo iflag=directory count=0
0+0 records in
0+0 records out
0 bytes (0 B) copied, 2e-05 seconds, 0 B/s
You can think of this as a way to do a "test -d foo && test -r foo"
atomically, without race conditions. Admittedly this is somewhat
twisted, but the new documentation does say that iflag=directory is of
"limited utility"....
- dd new iflag= oflag= flags directory, nolinks, Paul Eggert, 2006/03/06
- Re: dd new iflag= oflag= flags directory, nolinks, Phillip Susi, 2006/03/06
- Re: dd new iflag= oflag= flags directory, nolinks, Olivier Delhomme, 2006/03/21
- Re: dd new iflag= oflag= flags directory, nolinks,
Paul Eggert <=
- Re: dd new iflag= oflag= flags directory, nolinks, Phillip Susi, 2006/03/21
- Re: dd new iflag= oflag= flags directory, nolinks, Paul Eggert, 2006/03/21
- Re: dd new iflag= oflag= flags directory, nolinks, Phillip Susi, 2006/03/21
- Re: dd new iflag= oflag= flags directory, nolinks, Paul Eggert, 2006/03/27