-1

I have a folder which name is photo and it is 13gb. I checked my HDD space with df -h command and it said you have 50GB free space. Then I deleted my photo folder with rm -rf photo/ command. It deleted instantly. Now I am checking free space again with df -h command and it still says you have 50GB free space.

When I try to reach my photo folder i am getting

No such file or directory

Warning.

What can be cause to this problem? I am using Centos 6.5 x64

closed as off-topic by Diamant, mdpc, Jenny D, Ward, MadHatter Feb 27 '16 at 7:30

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

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – Diamant, mdpc, Jenny D, Ward, MadHatter
If this question can be reworded to fit the rules in the help center, please edit the question.

3

The photo directory might have been a symlink, or been a directory containing symlinks, which would explain both why no space was reclaimed and how it deleted so fast.

Unfortunately if it was symlinks, then you've deleted the links that would have told you where the actual files were. You can either search for the files yourself, or use locate <filename> if you can remember a filename, or find / -name <filename> if locate isn't installed. Or you can use du -xak / | sort -rn >/tmp/sizes to find the largest files/directories on disk, but that will take quite a while and use lots of disk I/O.

  • What do you suggest? – Tolgay Toklar Feb 25 '16 at 16:34
  • Try running lsof / | grep deleted to see if there's a process holding locks on the folder (like pako suggested). If you do find a process like that, kill it. – Mugurel Feb 25 '16 at 16:34
  • prntscr.com/a7tgu6 – Tolgay Toklar Feb 25 '16 at 16:42
  • That doesn't look like the command @Mugurel suggested. – Douglas Leeder Feb 25 '16 at 17:11
  • Try lsof / | grep deleted instead of lsof / | grep thumb – pako Feb 25 '16 at 17:17
0

The free space reported by df -h is not updated imediately after you delete some files. Try running:

sync

Also, if the files were opened by some processes, the inodes might still exists until the files are closed.

  • I tried sync command. Nothing changed. – Tolgay Toklar Feb 25 '16 at 16:41

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