1

I would like to copy a file from one disk (HDD with filesystem NTFS) to another (SSD with ExFAT, if it matters).
The problem occurs in the middle of the copy process, showing me the following message: The Finder can't complete the operation because some data in "File.data" can't be read or written. (Error code -36)

I have tried to use cp, rsync and dd without any luck.

The rsync command (with --ignore-errors flag) throws me the following error:

rsync: read errors mapping "/Volumes/HDD/File.data": Input/output error (5)
rsync: read errors mapping "/Volumes/HDD/File.data": Input/output error (5)
ERROR: File.data failed verification -- update discarded.
rsync error: some files could not be transferred (code 23) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-51/rsync/main.c(996) [sender=2.6.9]

dd just copied a partial data (the part before the problematic sector, without skipping it).

Any ideas how to copy this damn file?

  • Can you attach the disk to a Windows system and check/repair the filesystem from there? – nohillside Jan 14 '17 at 10:28
  • Sorry, it's not an option, as I have to buy a new PC and install a Windows OS. – Slavik Meltser Jan 14 '17 at 10:37
  • Besides, I can always connect a Windows and connect this disk to, but I'm trying to solve it from Mac/UNIX base system. – Slavik Meltser Jan 14 '17 at 10:40
  • 1
    What was the full dd command you used? Have you tried using ddrescue? – user3439894 Jan 14 '17 at 10:44
  • 1
    “as I have to buy a new PC and install a Windows OS” Maybe it's easier to just install a throwaway VM directly from Microsoft. But yeah, ddrescue is way better since probably you have some kind of hardware issues on that drive. – Andrea Lazzarotto Jan 15 '17 at 15:11
2

Aside from dd there is also ddrescue although it's not a native OS X/macOS utility, however it can be installed in a number of ways. Personally I prefer to compile directly from source code however Package Managers like Homebrew can be used, or a precompiled binary if one is comfortable accepting a precompiled binary from an non-authoritative source.

Note that to compile from source code or use a package manager you need to have Command Line Tools for Xcode installed. You do not need to have the full Xcode installed, just the Command Line Developer Tools which are only a couple hundred megabyte vs many gigabytes.

The Command Line Tools for Xcode install can be started from Terminal with the following command:

xcode-select --install

To use ddrescue read its manual page, man ddrescue in Terminal, or online: GNU ddrescue Manual

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .