Solved

Confirm file copy in shell script

Posted on 2011-09-28
2
422 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
What is ISQL? 6 99
shell script to send sms 2 62
Port ssh and port rsysc are different 2 59
AWS CLI issues with Tags 3 26
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now