Thanks for your quick reply. Specifically, I am attempting to preserve the timestamps of files with the -p flag. The script I'm running copies many files and some of them have permissions that prevent the preserve from working. The problem is that cp returns 1 for this failure and I fail even though it's an acceptable condition. I guess I'd like to see cp return a different return code so I didn't have to parse the string output of the command, or perhaps an additional flag that says we don't care if the preserve fails. I do care about severe errors like the copy failing completely, but if the preserve fails, the copy still could've succeeded.
Patrick J. Clas - Software Engineer - zSeries IBM, Endicott Phone: (607) 429-4425 T/L 620-4425 Office: 256-3 X007 [EMAIL PROTECTED] (Bob Proulx) 07/19/2005 10:41 AM Please respond to bug-coreutils To Patrick J Clas/Endicott/[EMAIL PROTECTED] cc [email protected] Subject Re: cp command Patrick J Clas wrote: > Is it intentional that no matter what the failure is, cp always returns 1 > instead of something meaningful for various failures? You say that as if returning a 1 upon a failure is not meaningful. Therefore you must have something in particular in mind. Could you expand a little on what you are thinking here? Is there anything in particular that is inadequate? In general there are many possible ways for a program to fail. Personally I believe that trying to enumerate all possible failures is not a good way to do things because it is never good to try to enumerate an unbounded set. And also on different operating systems there will be different failure modes available. This makes the handling of all possible errors impossible to keep the same across all platforms. Better to keep the model straight forward. Bob _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
