home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
std_unix
/
v21
/
042
< prev
next >
Wrap
Internet Message Format
|
1990-12-05
|
2KB
From news@cs.utexas.edu Fri Aug 17 18:18:20 1990
Received: from cs.utexas.edu by uunet.uu.net (5.61/1.14) with SMTP
id AA27113; Fri, 17 Aug 90 18:18:20 -0400
Posted-Date: 17 Aug 90 22:16:13 GMT
Received: by cs.utexas.edu (5.64/1.70)
id AA01766; Fri, 17 Aug 90 17:18:16 -0500
From: djm@eng.umd.edu (David J. MacKenzie)
Newsgroups: comp.std.unix
Subject: Re: Query about P1003.2 'cp' utility
Message-Id: <DJM.90Aug17151613@jolt.eng.umd.edu>
References: <439@usenix.ORG>
Sender: std-unix@usenix.ORG
Organization: Free Software Foundation
In-Reply-To: ast@cs.vu.nl's message of 17 Aug 90 09:46:37 GMT
X-Submissions: std-unix@uunet.uu.net
Date: 17 Aug 90 22:16:13 GMT
Reply-To: std-unix@uunet.uu.net
To: std-unix@uunet.uu.net
From: djm@eng.umd.edu (David J. MacKenzie)
In article <439@usenix.ORG> ast@cs.vu.nl (Andy Tanenbaum) writes:
(1) If the destination path exists:
(b) If the permissions of the file to which the destination path
refers to do not permit writing, actions are performed equivalent to
the unlink() #5.5.1[POSIX.1] function call using destination as the
path argument, and, if this fails for any reason...
Now, this behavior might be correct, but is this effect really intended by
P1003.2? Possibly, the user that wish to replace the dstfile entirely (as
opposed to overwriting it) should use rm BEFORE calling cp, and the -f option
should be used only to suppress interaction with the user.
Maybe draft 10 clarifies the situation?
In draft 10, cp never ever unlinks files.
In draft 10, all -f does in cp is turn off a previous -i.
I'm going to object to this on the FSF ballot; I think -f should make
it unlink (unconditionally), like it does for mv, ln, and rm, or else
not be specified at all in the standard, since it's not existing
practice.
--
David J. MacKenzie <djm@eng.umd.edu> <djm@ai.mit.edu>
Volume-Number: Volume 21, Number 42