Incorrect return value of cp with no-clobber option
From:
Anoop Sharma
Subject:
Incorrect return value of cp with no-clobber option
Date:
Thu, 6 Sep 2012 16:26:05 +0530
When -n (--no-clobber) option of cp is used and the DEST file exists, then, as
expected, cp is not able to copy the SOURCE to DEST.
However, cp returns 0 in this case.
Shouldn't it return 1 to indicate that copy operation could not be completed?
In absence of this indication how is one to know that some recovery
action like re-trying cp with some other DEST name is required?
Regards,
Anoop
[Prev in Thread]
Current Thread
[Next in Thread]
Incorrect return value of cp with no-clobber option,
Anoop Sharma<=