I have different partitions for / and ~, both with ext4 filesystems. In ~, I have a folder with many files, I tried to move the complete folder to the root partition

mv ~/folder /folder/

In the middle of the process, mv complained that there is not enough free space on the partition on which / is mounted. So I copied the files back

mv /folder/* ~/
rmdir /folder

Now some of the files in ~/folder are broken. Their file sizes are shown to be 0. I tried to unmount ~ and run fsck but it would only tell me everything is alright.

How did I break these files? And how can I recover them?

Edit: Ah, I just realized now, the files have now an ending called .part, otherwise the names are the same.

Edit: I don't understand why this question gets closed. I can reproduce it and it didn't "seemingly went away on its own". If you want to close it, you have to find a better reason.

closed as off-topic by Jeff Schaller, cas, Scott, daisy, Archemar Apr 8 '16 at 6:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, cas, Scott
If this question can be reworded to fit the rules in the help center, please edit the question.

  • When first destination filesystem get full, last moved file are zero sized. When moving back file from full filesystem to original one, you likely move back zero-size file, and so delete them. – Archemar Apr 8 '16 at 6:34
  • @Archemar That makes sense, I guess. So the files are lost forever? – pfnuesel Apr 8 '16 at 14:06
  • of course not, you have a backup ? – Archemar Apr 8 '16 at 15:34

That (with the ".part") sounds like OSX. If you attempted to move a set of files where you had no permission to remove the old files, those will be left behind, using space. But it will make a copy in the destination. If you move files back and forth, there will be some temporary files created, and OSX will not remove the old files until the move is complete. So you used extra space (the amount in the unmoveable files), and ran out of space.

  • I'm on Arch Linux. I have permission to remove files in my own home directory. The problem is not the extra space needed, I ran out of space on the destination where I moved the files to, not from. – pfnuesel Apr 8 '16 at 14:10

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