coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CP enhancement


From: Thomas Kimpton
Subject: CP enhancement
Date: Tue, 27 Aug 2024 00:39:18 -0700

"cp -n srcFile destFile" returns 0 if it copies the file. It also returns 0
if it fails to copy the file over an existing file. I would like "cp -n" to
return 1 (or perhaps EEXIST) when it will refuse to overwrite an existing
file. This would facilitate:

     cp -n srcFile destFile && chmod +x destFile

Or other similar idioms.

Thanks!

Tom Kimpton

-- 
----
Now, we can do this the hard way, or... well, actually there's just the
hard way.
  -- Buffy Summers, "Buffy the Vampire Slayer"


reply via email to

[Prev in Thread] Current Thread [Next in Thread]