Summary: Output from "cp" command

jhamlin_at_bhe.com
Date: 03/23/04

  • Next message: Malek Shabou: "Tru64 5.1A new patchkkit"
    Date: Tue, 23 Mar 2004 14:08:00 -0500
    To: tru64-unix-managers@ornl.gov
    
    

    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.


  • Next message: Malek Shabou: "Tru64 5.1A new patchkkit"

    Relevant Pages

    • Re: Automated Deployment Services and VSMT
      ... I put the target and master server in the same switch. ... Ran the capture and it worked fine. ... > command to return the geometry of your hard-disk. ...
      (microsoft.public.windows.server.setup)
    • Re: Catching errors in a shell scripts
      ... and `command` (incidentially I find ... doesn't capture standard error. ... to make the output escape ... Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org ...
      (Ubuntu)
    • Re: [SLE] The "cp" command is skipping files/dirs over nfs
      ... you can capture any output to a file. ... The best way I can think of for seeing it also, is to tail the capture file. ... To be able to see the stuff as it is written to the file, call the command (on ... On Wednesday 19 April 2006 10:59 am, James D. Parra wrote: ...
      (SuSE)
    • Re: Catching errors in a shell scripts
      ... and `command` (incidentially I find the ... capture standard error. ... $alloutput" mktemp generates a random filename, ... Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org ...
      (Ubuntu)
    • Re: Catching errors in a shell scripts
      ... and `command` (incidentially I find the ... capture standard error. ... $alloutput" mktemp generates a random filename, ... to make the output escape single ...
      (Ubuntu)