I sudo-copied documents from OSX extended filesystem to FAT32. Now, I see that two trees are different by size and by Stephen's command here

vimdiff <(find /Volumes/fat32/ -printf "%P %u:%g %m\n" | sort) <(find /Users/masi/BitTorrentSync/ -printf "%P %u:%g %m\n" | sort) 

How can you copy lossless from OSX ext to FAT32 without Ownerships/Permissions?

closed as unclear what you're asking by Anthon, cas, Scott, Archemar, dr01 May 30 '16 at 11:14

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • @Christopher Yes, I actually found out that the files in fat32 take more space than in OSX Extended. It makes sense, since fat32 is older format and less optimized. – Léo Léopold Hertz 준영 May 29 '16 at 16:36
  • 1
    FAT32 doesn't have ownership or permissions, so you can't. What's your objective? Do you want to use FAT32 for transport and then copy thee files back to another OSX machine? Do you want to have the files usable on the FAT32 system but be able to restore the permissions when you copy them to OSX? Something else? – Gilles May 29 '16 at 23:20
  • @Gilles Objective is transport of files between OSX and Linux. Permissions do not matter in the files. – Léo Léopold Hertz 준영 May 30 '16 at 6:13

Since permissions do not matter, copying with cp -R is fine.

The command you're using to compare the two trees compares the file names, ownership and permission. If you don't care about preserving permissions, don't print out the permissions!

vimdiff <(cd /Volumes/fat32/ && find . | sort) <(cd /Users/masi/BitTorrentSync/ && find . | sort)

But you should use a file synchronizer: rsync if you always copy in the same direction, Unison if to synchronize in both directions.

There is no way to preserve permissions on FAT32. If you wanted to copy files and preserve permissions, you'd need to use a different filesystem or put them in an archive (zip, 7z, tar.gz, …).

  • Great proposal about zip, ...! I had not thought about it. – Léo Léopold Hertz 준영 May 30 '16 at 11:38
  • I really like your cd ... && find | sort structure. Just outstanding! So much clearer than find location .... – Léo Léopold Hertz 준영 May 30 '16 at 11:44

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