All pastes #136503 Raw Edit

Someone

public text v1 · immutable
#136503 ·published 2006-08-17 18:43 UTC
rendered paste body
#!/bin/bash

find $1 -type f | while read file
{
  while (1); do # keep copying trying to copy this file till it works!
  {
    echo cp -R --preserve=all --no-dereference --parents "$file" "$2"

     #make sure it copied fine
     if [ $? -ne 0 ]; then
     {
       echo 'An error has occured, perhaps the medium is full. Press enter to continue, or 

CTRL+c to quit';
       read
     }else{
       break
     }
     fi
  }
  done;
}

echo 'complete'

exit