LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 06-12-2010, 02:26 PM   #1
Dr_Death_UAE
Member
 
Registered: Jul 2005
Location: U.A.E
Distribution: FreeBSD,Fedora,Solaris,AIX
Posts: 168

Rep: Reputation: 30
deleted file still fill space on the HD!


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!!

any idea how to remove or edit it under linux ?

thankx
 
Old 06-12-2010, 05:33 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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?



Cheers,
Tink
 
Old 06-12-2010, 06:26 PM   #3
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by Tinkster View Post
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?
 
Old 06-12-2010, 09:06 PM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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.
 
Old 06-13-2010, 02:47 AM   #5
Dr_Death_UAE
Member
 
Registered: Jul 2005
Location: U.A.E
Distribution: FreeBSD,Fedora,Solaris,AIX
Posts: 168

Original Poster
Rep: Reputation: 30
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.

Thanks again
 
Old 06-13-2010, 05:57 AM   #6
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
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.
 
Old 06-13-2010, 08:32 AM   #7
Dr_Death_UAE
Member
 
Registered: Jul 2005
Location: U.A.E
Distribution: FreeBSD,Fedora,Solaris,AIX
Posts: 168

Original Poster
Rep: Reputation: 30
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.
 
Old 06-13-2010, 11:13 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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?
 
Old 06-14-2010, 08:33 AM   #9
Dr_Death_UAE
Member
 
Registered: Jul 2005
Location: U.A.E
Distribution: FreeBSD,Fedora,Solaris,AIX
Posts: 168

Original Poster
Rep: Reputation: 30
thanks unspawn for your reply, but this didn't work:

Quote:
$ sudo bcwipe -v -F /media/removable/
Wiping scheme: Peter Gutmann's, 35 pass(es)
Wipe free space in /media/removable/ (y/[n])?y
Wiping free space on /media/removable/
Free space wiping pass 1/35 [random] started. Total free space 4115648 kB
wipe pass 1/35: 4115648/4115648 kB (100%) Rate: 22628 kB/s
Free space wiping pass 1/35 completed. Processed 4115648 kB, remaining 0 kB
..............
....................
.......................
Free space wiping pass 34/35 completed. Processed 4115648 kB, remaining 0 kB
Free space wiping pass 35/35 [random] started. Total free space 4115648 kB
wipe pass 35/35: 4115648/4115648 kB (100%) Rate: 22882 kB/s
Free space wiping pass 35/35 completed. Processed 4115648 kB, remaining 0 kB
Free space wiping pass 35 verification started
verify pass 35 : 4115648/4115648 kB (100%) Rate: 26760 kB/s
Free space wiping pass 35 verified 4115648 kB
Wiping free space on '/media/removable/' completed
bcwipe -F will wipe the freespace on the HD, but the deleted file is filling a space on my HD and not showing as a free space.

I am looking for a recovery tool that can remove deleted files permanently.
 
Old 06-15-2010, 04:04 AM   #10
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
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.

Code:
root@btd-techweb01:/# du --max-depth=1 -h . (note the dot)
5.5M    ./bin
314K    ./dev
8.9M    ./etc
21M     ./lib
2.5K    ./mnt
9.2M    ./opt
85K     ./tmp
512     ./sys
1.5G    ./var
1.8G    ./usr
3.1M    ./boot
940M    ./home
5.0K    ./proc
11M     ./sbin
5.2M    ./root
58M     ./server
4.3G    .
root@btd-techweb01:/#
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.
 
Old 06-15-2010, 05:50 AM   #11
Dr_Death_UAE
Member
 
Registered: Jul 2005
Location: U.A.E
Distribution: FreeBSD,Fedora,Solaris,AIX
Posts: 168

Original Poster
Rep: Reputation: 30
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.
 
Old 06-15-2010, 10:09 AM   #12
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
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?
 
Old 06-16-2010, 01:58 AM   #13
Dr_Death_UAE
Member
 
Registered: Jul 2005
Location: U.A.E
Distribution: FreeBSD,Fedora,Solaris,AIX
Posts: 168

Original Poster
Rep: Reputation: 30
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
 
Old 06-16-2010, 12:57 PM   #14
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
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.

And after this, I'm really out of options.
 
Old 06-16-2010, 03:12 PM   #15
Dr_Death_UAE
Member
 
Registered: Jul 2005
Location: U.A.E
Distribution: FreeBSD,Fedora,Solaris,AIX
Posts: 168

Original Poster
Rep: Reputation: 30
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fill a file with n bytes of a given value kalimat Programming 3 12-17-2008 04:48 AM
file deleted, but no space freed kpachopoulos Linux - General 3 02-07-2008 10:43 AM
bash/sed/awk fill each line in text file with space to fixed length khairil Programming 11 01-09-2008 05:28 AM
help with shell script - fill an array with values from a file delmoras Linux - General 1 07-17-2006 11:19 AM
I've deleted a log file to save space and... ganninu Linux - General 3 11-04-2003 12:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration