Solved

Confirm file copy in shell script

Posted on 2011-09-28
2
426 Views
Last Modified: 2012-05-12
I have a shell script that has steps to copy files.  How do I confirm that the file copy actually occurred?
0
Comment
Question by:jkavx
2 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 36720048
if ! cp source target ; then
 echo "Copy Failed!" ; fi

wmp

0
 

Author Comment

by:jkavx
ID: 36777078
Thx.  I have a similar problem with an ant task that executes make.  How can I determine if the make fails or not:

    <target name="package">
          <exec dir="pkg" executable="make">
               <arg value="package"/>
         </exec>
    </target>
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question