a user just pointed out this corner case with -a which i think is a bug ... 
seems to happen with any special file (fifo, device node, etc...), but it was 
first noticed with a device node

# mkdir src dst
# touch dst/null
# mknod src/null c 1 3
# cp -a src/* dst/
cp: cannot create special file `d/null': File exists
# cp -a s/null d/null -f
cp: cannot create special file `d/null': File exists
# ls -l d/null
-rw-r--r-- 1 root root 0 2007-06-28 05:41 d/null

i think in the case where cp encounters the destination as being a regular 
file and the source as being a special file, it should simply unlink the 
destination and create the destination the same as if it didnt exist in the 
first place
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to