Não sei se o Safecopy cria os diretórios ausentes no caminho de destino, portanto, os criamos primeiro:
cd /media/newdrive/billrescue
find /media/brokendrive/Users/bill/Documents -type d -printf "%Pcd media/brokendrive/Users/bill/Documents
find . -type f -exec echo safecopy {} /media/newdrive/billrescue/{} \; | head
" |
xargs -0 echo mkdir -p
Agora chamamos safecopy
uma vez para cada arquivo:
find /media/brokendrive/Users/bill/Documents -type f -printf "%Pcd /media/newdrive/billrescue
find /media/brokendrive/Users/bill/Documents -type d -printf "%Pcd media/brokendrive/Users/bill/Documents
find . -type f -exec echo safecopy {} /media/newdrive/billrescue/{} \; | head
" |
xargs -0 echo mkdir -p
" |
xargs -0 -I{} echo safecopy /media/brokendrive/Users/bill/Documents/{} /media/newdrive/billrescue/{}
Remova o echo
e o | head
se a saída for o que você precisa.
Ou:
find /media/brokendrive/Users/bill/Documents -type f -printf "%P%pre%" |
xargs -0 -I{} echo safecopy /media/brokendrive/Users/bill/Documents/{} /media/newdrive/billrescue/{}