Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site watcgl.UUCP Path: utzoo!watmath!watcgl!dmmartindale From: dmmartindale@watcgl.UUCP (Dave Martindale) Newsgroups: net.bugs.4bsd Subject: Re: dd(1) trashes file if input and output same Message-ID: <2310@watcgl.UUCP> Date: Mon, 26-Mar-84 01:13:06 EST Article-I.D.: watcgl.2310 Posted: Mon Mar 26 01:13:06 1984 Date-Received: Mon, 26-Mar-84 20:45:29 EST References: <2766@hplabs.UUCP> Organization: U of Waterloo, Ontario Lines: 7 If you really want, you can wait until the input and output files are open and then do fstat on both of them and compare inumbers and devs. This would catch the case of dd if=foo >foo However, I'm going to do none of this. Dd is often used to copy data from raw devices, and sometimes it makes sense to have the input and output "files" the same if they are in fact not files but special files.