I have a drive of files recovered from a mac (hfs+) that I'm trying to copy over to an ntfs volume so that they can be accessed from a Windows machine. There are, unfortunately, quite a few files with characters that won't copy.

This is a very similar question to this one, but I've tried both mounting the ntfs volume with the windows_names option, and using rsync with the iconv option (with utf-8 and utf-8-mac in different orders, or with '.'), both without success. To my understanding, I also can't use the detox option, as I can't write to the drive with the original files (journaled hfs+ can only be mounted read-only on linux).

I'm on Ubuntu 19.04, and I've tried copying from the GUI and rsync so far.

If it helps, with the ntfs drive mounted with the 'windows_names' option, I use

sudo rsync --append-verify -r <source> <dest>

and get

rsync: open "/location/Reunion??.rtf" failed: Invalid argument (22)

from files with invalid characters.

Can I maybe pipe the files through detox somehow so that they're not writing to the original drive or the destination that won't accept the invalid characters? Do I have to change all the files manually? Is there a regex script option, maybe?

  • I had a problem like this once. Never figured out how to do it right. I ended up renaming the files in the source file system.
    – Hermann
    Mar 26 '20 at 19:47

Not ideal, but I solved this by using an ext4 drive as an intermediate location. I copied the files from the hfs+ drive to an ext4, then used detox, then copied the files again over to the ntfs drive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.