Summary: Output from "cp" command

From: jhamlin@bhe.com
Date: Tue Mar 23 2004 - 14:08:00 EST


Original message:

Is there any way to capture any data from the cp command? At a minimum, I
would like to at least capture the completion notification. If you do:
 
cp -Rp test1 test2 &
 
when the copy is complete, a "done" message will be displayed to the screen.
Is this message available when doing:
 
cp -Rp test1 test2
 
and can it be captured?
 
Other pertinent file information about the file copy would be helpful as
well, if possible.

****************************************************************************
*******************************

Thanks to all that responded. The list is far too long to include everyone,
so I will just summarize the solutions:

1) "&" just puts the command in background mode (I knew this)
2) The "done" comes from the shell as a result of the command completing
after having been put into background with "&" (I knew this, too) and has
little or nothing to do with the actual status of the "cp" command (this I
did not know)
3) Use vdump/vrestore instead
4) Check the status by using $? - This gives a basic successful or
unsuccessful completion (0 or 1)
5) Generate a canned response with a print command - print "Done" (not
exactly what I was looking for)
6) And the winning answer - No, no, and no. cp is not exactly a robust
command and has little in the way of information to be shared with the
person or script executing it.

We will figure something else out. Thank you all again for your prompt and
timely responses.

Jef H. HamLin
(Senior Unix Systems Administrator)
Bangor Hydro Electric
33 State Street
Bangor, Maine 04401
jef@bhe.com
--------------------------------------------------
NOTICE OF CONFIDENTIALITY: This e-mail communication is considered
confidential and is intended for the person or persons identified as the
recipient.

If you are not the identified e-mail recipient(s) and have received this
e-mail communication in error, please reply to the sender immediately
stating that you received this e-mail in error, and then delete this e-mail
communication. Unauthorized disclosure or copying of this e-mail
communication is prohibited.



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:49:55 EDT