From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: jhamlin@bhe.com Newsgroups: gmane.os.tru64.managers Subject: Summary: Output from "cp" command Date: Tue, 23 Mar 2004 14:08:00 -0500 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Trace: sea.gmane.org 1080068931 31430 80.91.224.253 (23 Mar 2004 19:08:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 Mar 2004 19:08:51 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Tue Mar 23 20:08:40 2004 Return-path: Original-Received: from sws1.ornl.gov ([160.91.1.101]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1B5rGR-0005vw-00 for ; Tue, 23 Mar 2004 20:08:39 +0100 Original-Received: (qmail 8355 invoked by uid 5); 23 Mar 2004 19:08:32 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 8340 invoked by uid 49493); 23 Mar 2004 19:08:32 -0000 Original-Received: from jhamlin@bhe.com by sws1 by uid 49491 with qmail-scanner-1.16 (iscan: v3.1/v5.600-1011/622/49252. clamscan: 20030605. spamassassin: 2.55. Clear:SA:0(-3.6/5.0):. Processed in 0.961329 secs); 23 Mar 2004 19:08:32 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (160.91.4.119) by 0 with SMTP; 23 Mar 2004 19:08:31 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.2-X17 #30669) with ESMTP id <0HV1003QNMI4K3@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 23 Mar 2004 14:08:30 -0500 (EST) Original-Received: from smtp.bhe.com (smtp.bhe.com [204.69.17.153]) by emroute1.cind.ornl.gov (PMDF V6.2-X17 #30669) with ESMTP id <0HV10029GMHO0Y@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 23 Mar 2004 14:08:13 -0500 (EST) Original-Received: from Unknown [172.16.6.50] by smtp.bhe.com - SurfControl E-mail Filter (4.7); Tue, 23 Mar 2004 14:11:50 -0500 Original-Received: by emailsvr.bhe.com with Internet Mail Service (5.5.2653.19) id ; Tue, 23 Mar 2004 14:08:10 -0500 Original-To: tru64-unix-managers@ornl.gov X-Mailer: Internet Mail Service (5.5.2653.19) X-SEF-65AE0433-3D0C-4D2B-8C3-79E6D4B24AF8: 1 Xref: main.gmane.org gmane.os.tru64.managers:6684 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:6684 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.