I am attempting to copy files from my OS X box into my new Linux box by way of an non-journaled HFS+ external hard drive. While most files copied over to the new machine just fine, I noticed a surprising number of empty files (0 bytes) that should not be. When the drive is mounted on the OS X machine, however, the files appear as expected. Running fsck did not fix the issue.

Any ideas on what the issue could be?


the HFS+ file system can compresses files and replaces them with 0byte files (also called sparse files) that are like symbolic links.

you can use du with --apparent-size option to see the real size of those files.

  • Interesting.. are you aware of a method to "decompress" the filesystem? When I copy the files over from the HFS+ HD to the ext4 HD on the Linux box, it simply copies over the 0B file – vordhosbn Jun 1 '16 at 18:59
  • I don't have a mac to test and i couldn't find any tools that do the job on linux , but i found that you can decompress them on your OS X box with ditto --nohfsCompression [emptyf] [newfile]. ditto manual – user257256 Jun 1 '16 at 19:42

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.