All pastes #136460 Raw Edit

Someone

public text v1 · immutable
#136460 ·published 2006-08-17 18:15 UTC
rendered paste body
#!/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'