home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / v21 / 042 < prev    next >
Internet Message Format  |  1990-12-05  |  2KB

  1. From news@cs.utexas.edu  Fri Aug 17 18:18:20 1990
  2. Received: from cs.utexas.edu by uunet.uu.net (5.61/1.14) with SMTP 
  3.     id AA27113; Fri, 17 Aug 90 18:18:20 -0400
  4. Posted-Date: 17 Aug 90 22:16:13 GMT
  5. Received: by cs.utexas.edu (5.64/1.70)
  6.     id AA01766; Fri, 17 Aug 90 17:18:16 -0500
  7. From: djm@eng.umd.edu (David J. MacKenzie)
  8. Newsgroups: comp.std.unix
  9. Subject: Re: Query about P1003.2 'cp' utility
  10. Message-Id: <DJM.90Aug17151613@jolt.eng.umd.edu>
  11. References: <439@usenix.ORG>
  12. Sender: std-unix@usenix.ORG
  13. Organization: Free Software Foundation
  14. In-Reply-To: ast@cs.vu.nl's message of 17 Aug 90 09:46:37 GMT
  15. X-Submissions: std-unix@uunet.uu.net
  16. Date: 17 Aug 90 22:16:13 GMT
  17. Reply-To: std-unix@uunet.uu.net
  18. To: std-unix@uunet.uu.net
  19.  
  20. From: djm@eng.umd.edu (David J. MacKenzie)
  21.  
  22. In article <439@usenix.ORG> ast@cs.vu.nl (Andy Tanenbaum) writes:
  23.  
  24.        (1) If the destination path exists:
  25.  
  26.        (b) If the permissions of the file to which the destination path
  27.        refers to do not permit writing, actions are performed equivalent to
  28.        the unlink() #5.5.1[POSIX.1] function call using destination as the
  29.        path argument, and, if this fails for any reason...
  30.  
  31.    Now, this behavior might be correct, but is this effect really intended by
  32.    P1003.2? Possibly, the user that wish to replace the dstfile entirely (as
  33.    opposed to overwriting it) should use rm BEFORE calling cp, and the -f option
  34.    should be used only to suppress interaction with the user.
  35.  
  36.    Maybe draft 10 clarifies the situation?
  37.  
  38. In draft 10, cp never ever unlinks files.
  39. In draft 10, all -f does in cp is turn off a previous -i.
  40. I'm going to object to this on the FSF ballot; I think -f should make
  41. it unlink (unconditionally), like it does for mv, ln, and rm, or else
  42. not be specified at all in the standard, since it's not existing
  43. practice.
  44.  
  45. --
  46. David J. MacKenzie <djm@eng.umd.edu> <djm@ai.mit.edu>
  47.  
  48. Volume-Number: Volume 21, Number 42
  49.  
  50.