[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Should cp -n return 0, when DEST exists?
From: |
Anoop Sharma |
Subject: |
Should cp -n return 0, when DEST exists? |
Date: |
Thu, 6 Sep 2012 16:20:15 +0530 |
When -n 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