#!/bin/bash # find each and every file we're going to copy list=`find $1 -type f -print0 | xargs -0 echo` for file in $list { cp -R --preserve=all --no-dereference --parents $file $2 #make sure it copied fine if [ $? -ne "0" ]; then echo 'press a key to continue, or CTRL+c to quit'; #go back to beginning of loop and try this file again... #... fi } echo 'complete'