Article View: comp.std.unix
Article #495Re: Query about P1003.2 'cp' utility
From: John Cowan
Date: Fri, 07 Sep 1990 16:12
Date: Fri, 07 Sep 1990 16:12
16 lines
1250 bytes
1250 bytes
From: cowan@marob.masa.com (John Cowan) In article <490@usenix.ORG> caywood@teb.larc.nasa.gov (John Caywood) writes: >I take this to mean that, no, cp doesn't unlink an existing file, but >it truncates it upon opening under these conditions. Consequently, >yes, djm is correct, cp doesn't unlink. I don't understand, though, >why opening with O_TRUNC isn't equivalent. The difference between unlinking before opening and opening with O_TRUNC is, of course, that the former course of action can change the file's owner, group, and mode settings, whereas the latter course of action cannot. -- cowan@marob.masa.com (aka ...!hombre!marob!cowan) e'osai ko sarji la lojban Volume-Number: Volume 21, Number 90
Technical Details
Message-ID:
<496@usenix.ORG>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!occrsh!uokmax!munnari.oz.au!uunet!usenix!std-unixReferences:
<490@usenix.ORG> <DJM.90Aug17151613@jolt.eng.umd.edu> <439@usenix.ORG>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!occrsh!uokmax!munnari.oz.au!uunet!usenix!std-unix From: cowan@marob.masa.com (John Cowan) Newsgroups: comp.std.unix Subject: Re: Query about P1003.2 'cp' utility Message-ID: <496@usenix.ORG> Date: 7 Sep 90 16:12:07 GMT References: <490@usenix.ORG> <DJM.90Aug17151613@jolt.eng.umd.edu> <439@usenix.ORG> Sender: std-unix@usenix.ORG Organization: ESCC, New York City Lines: 16 Approved: jsq@usenix.org (Moderator, John Quarterman) X-Submissions: std-unix@uunet.uu.net