home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / v21 / 042 / text0000.txt < prev   
Encoding:
Internet Message Format  |  1990-12-05  |  1.2 KB

  1. From: djm@eng.umd.edu (David J. MacKenzie)
  2.  
  3. In article <439@usenix.ORG> ast@cs.vu.nl (Andy Tanenbaum) writes:
  4.  
  5.        (1) If the destination path exists:
  6.  
  7.        (b) If the permissions of the file to which the destination path
  8.        refers to do not permit writing, actions are performed equivalent to
  9.        the unlink() #5.5.1[POSIX.1] function call using destination as the
  10.        path argument, and, if this fails for any reason...
  11.  
  12.    Now, this behavior might be correct, but is this effect really intended by
  13.    P1003.2? Possibly, the user that wish to replace the dstfile entirely (as
  14.    opposed to overwriting it) should use rm BEFORE calling cp, and the -f option
  15.    should be used only to suppress interaction with the user.
  16.  
  17.    Maybe draft 10 clarifies the situation?
  18.  
  19. In draft 10, cp never ever unlinks files.
  20. In draft 10, all -f does in cp is turn off a previous -i.
  21. I'm going to object to this on the FSF ballot; I think -f should make
  22. it unlink (unconditionally), like it does for mv, ln, and rm, or else
  23. not be specified at all in the standard, since it's not existing
  24. practice.
  25.  
  26. --
  27. David J. MacKenzie <djm@eng.umd.edu> <djm@ai.mit.edu>
  28.  
  29. Volume-Number: Volume 21, Number 42
  30.  
  31.