LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-25-2011, 02:41 PM   #1
tonj
Member
 
Registered: Sep 2008
Posts: 431

Rep: Reputation: 24
command to erase all deleted files


I'm running centos 4.9 and my drive is full of deleted files taking up space, and it also makes raid mirroring take forever. Is there a command that will completely erase all previously deleted files?
 
Old 11-25-2011, 03:22 PM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209
Well, deleted files are deleted. They're no longer taking space. How exactly did you 'delete' them? Did you just put them in the Trash (= empty it)?
 
Old 11-25-2011, 03:42 PM   #3
tonj
Member
 
Registered: Sep 2008
Posts: 431

Original Poster
Rep: Reputation: 24
these deleted files are kind of taking space, because they're not truly deleted, they're just realocated to hide them from the file system. I have the ability to restore them which means they are still there and they're causing my raid mirroring to take around 14 hours. The machine I'm on has no gui, it's all command line so there is no trash bin. I need to "wipe completely" all files that have been previously deleted and I have to do it at the command line.
 
Old 11-25-2011, 03:43 PM   #4
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209
Where are they relocated? Can you find them?
 
Old 11-25-2011, 03:49 PM   #5
tonj
Member
 
Registered: Sep 2008
Posts: 431

Original Poster
Rep: Reputation: 24
no there's thousands of them, I need a global command that will simply wipe them all for me, if there is such a thing.
 
Old 11-25-2011, 04:02 PM   #6
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209
Are they in a hidden directory? How exactly do you know they are taking space? To have a "global command" that will wipe them all you need to know where they are.

What's the output of 'df -h'?

You need to provide more details to be able to diagnose anything.
 
Old 11-25-2011, 04:10 PM   #7
tonj
Member
 
Registered: Sep 2008
Posts: 431

Original Poster
Rep: Reputation: 24
]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md1 1.9G 1.2G 678M 64% /
/dev/md2 1.9G 193M 1.7G 11% /var
/dev/md5 1.9G 33M 1.8G 2% /tmp
/dev/md6 120G 58M 114G 1% /home
none 253M 0 253M 0% /dev/shm

the deleted stuff is all on /dev/md6
 
Old 11-25-2011, 04:18 PM   #8
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209
Ok, that's better. Now can you post the output of:

Code:
du /home | sort -n -r | head -n 10
 
Old 11-25-2011, 04:28 PM   #9
tonj
Member
 
Registered: Sep 2008
Posts: 431

Original Poster
Rep: Reputation: 24
]# du /home | sort -n -r | head -n 10
25608 /home
13048 /home/phpmyadmin
11740 /home/.sites
11708 /home/.sites/server
11704 /home/.sites/server/logs
8396 /home/phpmyadmin/lang
8028 /home/.sites/server/logs/2011
3544 /home/.sites/server/logs/2010
1612 /home/phpmyadmin/libraries
1216 /home/.sites/server/logs/2010/9
 
Old 11-25-2011, 04:43 PM   #10
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 343Reputation: 343Reputation: 343Reputation: 343
Hi there,

Quote:
Originally Posted by tonj View Post
]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md1 1.9G 1.2G 678M 64% /
/dev/md2 1.9G 193M 1.7G 11% /var
/dev/md5 1.9G 33M 1.8G 2% /tmp
/dev/md6 120G 58M 114G 1% /home
none 253M 0 253M 0% /dev/shm

the deleted stuff is all on /dev/md6
you can't be serious, can you?
You're complaining about 58MB, a mere nothing, on a 120GB file system? Not really, are you?

[X] Doc CPU
 
Old 11-25-2011, 04:47 PM   #11
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209
Quote:
Originally Posted by Doc CPU View Post
Hi there,



you can't be serious, can you?
You're complaining about 58MB, a mere nothing, on a 120GB file system? Not really, are you?

[X] Doc CPU
Look more closely:
dev/md6 120G 58M 114G 1% /home

Used 58M
Left 114G out of 120G.

I don't know much about RAID but either it's "reserved" some space or something is indeed not right here.

Last edited by sycamorex; 11-25-2011 at 04:53 PM.
 
Old 11-25-2011, 04:49 PM   #12
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
no there's thousands of them, I need a global command that will simply wipe them all for me, if there is such a thing.
What files are you talking about?
Could it be the files are still in use ?

Kind regards
 
Old 11-25-2011, 04:51 PM   #13
tonj
Member
 
Registered: Sep 2008
Posts: 431

Original Poster
Rep: Reputation: 24
its the deleted files! There's about 60Gb of deleted files on md6. raid mirroring doesn't just copy valid files it also copies deleted files, so that they could potentially be restored in the future. I don't want to restore them I want to wipe them away completely so the drive space is EMPTY.
 
Old 11-25-2011, 04:54 PM   #14
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 343Reputation: 343Reputation: 343Reputation: 343
Hi there,

Quote:
Originally Posted by sycamorex View Post
Look more closer:
dev/md6 120G 58M 114G 1% /home

Used 58M
Left 114G out of 120G.

I don't know much about RAID but either it's "reserved" some space or something is indeed not right here.
it probably is reserved space, I discussed this subject a few days ago with someone else. You're using a journaling file system like ext3 or ext4? And not surprisingly, it's about the same percentage again, roughly 5..6% of the partition.

[X] Doc CPU
 
1 members found this post helpful.
Old 11-25-2011, 05:03 PM   #15
tonj
Member
 
Registered: Sep 2008
Posts: 431

Original Poster
Rep: Reputation: 24
reserved space? that doesn't sound right and doesn't align with previous raid mirroring I've done. It's the deleted files it's the deleted files it's the deleted files. Is there a command that will show them and let me completely erase them?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Recover Deleted Files when rm command was used (I recovered using ext3grep) rtoney5 Linux - Software 8 01-14-2013 05:19 AM
[SOLVED] Yum Erase - Many packages deleted vvenomouss Linux - Software 5 11-09-2011 03:49 AM
How To Get "# of files deleted" From RM Command At Terminal? [Solved] johnywhy Linux - Newbie 6 09-05-2011 09:28 PM
Recovery deleted folders and files when using rm -rf command ytd Linux - General 6 04-06-2010 06:59 AM
Command erase lines paraiso Linux - Newbie 4 05-12-2005 10:48 AM


All times are GMT -5. The time now is 02:40 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration