I was backing up my Skyrim folder coz i had to reinstall windows 7 for some dark reasons. I also backed up other videogames, which all got well copied from windows partition to Linux partition. But apparently Skyrim and only Skyrim have 1.3 gigabytes more (repeat: MORE) than the original folder, with approx. 2000 files more. But i checked the subfolders and the files within the Skyrim root and the number of files and size are equal as the originals, i checked hidden files, there is one which is the .directory into the root and that's all. So WTH Linux?

WTH Linux!?

I point out that kwin crashed while copying, maybe is that it? I dunno, some one explains me this mistery please.

  • I copied again the folder and i have the same result. – Azarilh Sep 14 '18 at 14:23
  • How did you copy the directories? Also, have you tried using rsync for that? rsync -avr /original/directory /new/backup – Fanatique Sep 14 '18 at 15:18
  • No. Actually i just copy and paste the files with Dolphin, i never needed those backup softwares. – Azarilh Sep 16 '18 at 2:55

Dolphin like du detects hardlinks and counts each inode just once. You can have 1000 files of 1 MiB each but if they are just one file hardlinked under 999 extra names then these tools will say there is one file total and the size is 1 MiB total.

NTFS (the source filesystem is NTFS, isn't it?) doesn't use Unix-like inodes, yet it supports hardlinks in its own way and Linux driver understands this. I expect Dolphin or du to behave in a similar fashion when they calculate the number of files and total size.

Your issue is because the original directory contains one or more files that appear under two or more paths each. I guess you used a copying tool that doesn't care about hardlinks; it just naively reads files and writes somewhere else, one by one. For this reason each file in the copy is independent from any other, there are no two files being hardlinks to each other there; so Dolphin counts more of them.

The copy lost information about which multiple paths should lead to the same file. It probably lost more: metadata like ownership and permissions, because Linux filesystems use different scheme than Windows. It's hard to say if and how this will affect the game after you restore it to Windows in the future.

For future reference:

  • Thank you kindly. Yet i still don't understand why the copy have 1.3 GiB more if it's a loss of information. – Azarilh Sep 14 '18 at 16:43
  • @Azarilh Read the first paragraph again. A simple copy would report 1000 MiB instead of 1 MiB. Yet the information that all files should be the same even if you edit one of them – is lost. – Kamil Maciorowski Sep 14 '18 at 16:55

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.