cp -n vs. test -f

Andrew P. infofarmer at gmail.com
Tue Jan 24 09:42:04 PST 2006


So why do we use "if [ ! -f file ] ; then cp file.new file; fi"
instead of "cp -n file.new file" in pkg-plist's and many
other places? I think the "cp -n" way is what we really
mean to do.

Thanks,
Andrew P.


More information about the freebsd-ports mailing list