Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello, I have external USB HD 500 GB, by mistake folder with 13 GB deleted, using some windows recovery tools, i got it back, but the deleted folder still take and fill space on the HD!!
Sorry, I don't understand what you're trying to achieve. You accidentally
deleted a directory, managed to restore it, and now you're complaining that
it takes up space? What did you expect to happen when you restore it?
You accidentally
deleted a directory, managed to restore it, and now you're complaining that it takes up space?
I think that the OP may be complaining that while he (she?) has recovered some/all of the 13G that he deleted, he has also recovered a whole lot of other stuff that he didn't want back. Or something.
I'm not entirely convinced that I can guess what he would like us to do about the situation, though. Recommend that he deletes the stuff he doesn't want? Maybe what we are suppose to do, under the circumstances, is to recommend that he backs everything up first?
Sounds like the OP doesn't realize that deleting a file only deletes the pointer to that file. The file remains until it is overwritten by another file.
Hello, sorry for my English, i delete folder by mistake but the deleted folder is still taking space "13GB" of the HD
forget about the recover part, i recover the folder and store it on anther HD
i think if i manage to wipe that folder completely from the HD then i will got the 13GB free again. but the deleted folder just visible by recovery tools and they don't have option to wipe a deleted file's just to recover them.
How did you delete? Using Windows or Linux? If the latter, using command line or using gui tools? In the latter case, the first thing to check would be the trash.
hello Wim Sturkenboom, it have been deleted under linux gui, trush is empty.
in mater of fact i dont remember that i delete the folder, i just rename it, the i fount the folder is empty!!
from the recovery tool on windows i found the folder with the old name. not sure what happen.
i think some issue happen to the folder pointer, but by question is how to remove that folder as the folder is not visible.
You could wipe free space on the disk by creating a huge file with 'dd' (like 'dd if=dev/zero of=/mnounted/disk/filename bs=1m') or using 'sfill' or 'bcwipe' with the "-F" switch?
Did you accidently rename to a directory with a dot at the beginning of the name? Run ls -al to make hidden files and directories visible or setup your file browser to make them visible.
You can also run the command du to find big directories. Navigate to the mountpoint of the HD (e.g. /media/removable). Example below for HD with the OS on one of my servers.
I've added the --max-depth option because I would get to many results without it. Check for those bigger than 13GB, navigate into them and run the command again.
Hello Wim Sturkenboom, the folder is not hidden, "du" and "ls -lah" is not showing it, but testdisk detect it.
what i remember, i just rename the folder and boom all files inside it disappear, from testdisk i saw the folder with all its files with the old name, and it fill a space on the HD, because the remaining space before the folder disappear was 3.9GB, and after it disappear it remain 3.9GB !! I empty trash and run fsck, nothing change.
that i am looking for is a tool like testdisk but have ability to delete and wipe, testdisk can only copy deleted or corrupt files.
I'm more or less at a loss. The last thing that I can think of is that an application still has the directory locked in some way. But as you have moved the HD between linux and windows, that should no longer be the case.
What does Windows see, by the way? Also still those 13GB missing?
Hello wim, windows is showing the same as linux, it show free space is 3.9GB, but the deleted folder is 13GB, it should show 16.9GB as free space.
I think this is something related to Ext3 FS and the file pointer.
the only 2 solution i can think of right now is to have a recovery tool that can wipe the deleted folders, or to buy a new 500GB HD and backup my files there then formate the old HD.
the important thing for me is to know what make the problem, so i can avoid it next time
Do you dual boot windows or is it running in a virtual machine or are there different physical machines? Did you reboot the machine on which you renamed the folder?
Reason for asking:
sometimes applications have a file in use and even when deleting the file, the space is not freed till the application gives it up; this is where you might encounter a difference between the results of df and du. The command lsof might be of help to see which application has what in use; else a reboot will close the applications that still might have files in use and that should solve the issue if the given cause is indeed causing the issue.
hello wim, i have linux and windows on the same pc, I dont think windows or any application cause this issue, because the folder I renamed just have video's on it and I I renamed it under linux
lsof didn't show any application blocking or using any this from the external HD
from ext3 FAQ:
Quote:
Q: How can I recover (undelete) deleted files from my ext3 partition?
Actually, you can't! This is what one of the developers, Andreas Dilger, said about it:
In order to ensure that ext3 can safely resume an unlink after a crash, it actually zeros out the block pointers in the inode, whereas
ext2 just marks these blocks as unused in the block bitmaps and marks the inode as "deleted" and leaves the block pointers alone.
Your only hope is to "grep" for parts of your files that have been deleted and hope for the best.
I think this may happen with me, some crash happen and ext3 zero the block pointer for the renamed folder, actual the reamed folder didn't disappear only the video files inside it disappears, and i found them with the recovery tool inside folder with the original name.
Last edited by Dr_Death_UAE; 06-16-2010 at 03:25 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.