> > cp [-Pfip] source_file target_file
> 
> Thanks for the clarification. So POSIX mandates all of -fin are allowed,
> the last taking precedence. I presume it also means warnings should not be
> printed.

No, POSIX only mandates -fi.  -n is an extension, so we can make it
behave however we'd like (although consistent behavior goes a long way).

> In any case I think the `mv` descriptions should we reworded to something
> like:
> 
> -f    rename a file even if the destination is present and not writable
>       (overrides any previous -i or -n option).

Not quite.  -f and -i do not override each other.  Per POSIX, they
affect independent code paths, such that:

cp
cp -f
cp -i
cp -f -i (also spelled cp -i -f)

have four different behaviors.

-- 
Eric Blake

-- 
View this message in context: 
http://www.nabble.com/cp-mv%3A-add--n-option-to-not-overwrite-target-%28Ubuntu-bug--229182%29-tp19990260p21129699.html
Sent from the Gnu - Coreutils - Discuss mailing list archive at Nabble.com.



_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to