LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 07-17-2009, 02:36 AM   #1
john99
Member
 
Registered: Mar 2007
Posts: 44

Rep: Reputation: 15
sfill - secure free disk and inode space wiper


Hello

It seems that Icognito does include the sfill tool (a free disk and inode space wiper) :-)


Is it possible to "clean" whole (ext3-) devices/partitions or only folders
(or can this simply be done by defining the mount point) ?



Thank's a lot for any feedback!

John
 
Old 07-17-2009, 07:24 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,688
Blog Entries: 54

Rep: Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955
THC's sfill is not specific to Incognito or any other distribution so I moved your thread to the Linux Software forum. As the manual says sfill will wipe either free inode space or free disk space. Compare with for instance Jetico's bcwipe which can wipe out complete block devices, selected files (and recurse into directories), free disk space or file slack space and has a bit more configuration options wrt passes.
 
Old 09-20-2009, 11:42 PM   #3
irlandes
Member
 
Registered: Nov 2003
Posts: 117

Rep: Reputation: 16
sfill and bcwipe, my experiences

Moderators, if this is unacceptable feel free to delete. I just typed it up for CentOs and it is easy for me to paste here as well. More than you wanted to know about sfill and bcwipe. I simply moved the sfill from Kubuntu to CentOs and it runs.



I. I took the file sfill from /usr/bin/sfill in my Kubuntu machine, which I got by sudo apt-get install secure-delete.

I moved it into my CentOs 5.3 machine, also at /usr/bin/sfill using a flash drive, and in su mode, cp to final source.


II. Then, I cloned my emachine, which has several distros on it, to an external HD. I did this with a Puppy Linux live CD, which I booted;

(Of course, I had the USB lead of external HD connected to USB port, and running)

When it booted, I hit F2, then typed: puppy acpi=off pfix=ram

This loads the Puppy distro solely in Ram so it touches nothing.

A few clicks for keyboard, and when it shows Desktop, if you want change resolution.

Then click on the icon which says console. Enter dd if=/dev/sda of=/dev/sdb

These are the names Puppy shows on the Desktop.

Wait 16+ hours. Record message on completion in case you must reinstall it from clone.

In my case, it said:

234441648 +0 records in
234441648 +0 records out

If you need to reinstall from clone, reverse the sdb and sda, and set blocks per man dd to that number recorded.


III. I re-booted into CentOs, which is on hda13.

Open a terminal, to su

type sfill -I -l -l -v /home

This wipes all free space in the partition on which /home is located and only does one pass, filling with random data.

Hit <enter>

It will say creating /home/oooooooo.ooo...

Open another console terminal, type df <enter> Note the usage.

Wait a couple minutes and hit df again, and you can see the partition filling.

On my partition, it was in 1K blocks:

11227664 7839068 used, 2809056 available 74%

It climbed toward 100%. When it said 100% it actually kept going, because the 100% is rounded up, I guess.

When it hit the end, it lets you know it is done. In a minute, the df will show 74% again.

On mine, it took 17 minutes and 14 seconds for one pass.


IV. This does not wipe slack space, the difference between cluster size and file size. Allegedly, this requires a program from http://www.jetico.com/download/ which is BCWipe-1.9-3.i386.rpm

I installed it with: rpm -i BCWipe-1.9-3.i386.rpm

I typed: bcwipe and it gave me the basic nomenclature. There is an option for wiping slack space.

Playing with it, I learned that this command will wipe all slack of unhidden files in the current directory only.

bcwipe -mz -n 60 -S -v *

In the Desktop it reported: Wiped 72KB of file slacks.

Note -n 60 is not needed for -mz since it is single pass.

Changing su console to, or example, /sbin, then run above command wiped 472K of file slacks.

It will not do recursive, only current directory.


Someone on the official forums said this in answer to a question how to clean all slack:

"You can try something like find <path_here> -type f -exec bcwipe -Smd {} \;
Remember, it will be lenghty operation if you have many files there."

I would not trust a command which said "something like" but I bet there is a way if that isn't correct.



So far no system damage noted. But, I sure feel better with a clone.

REMEMBER TO WIPE YOUR EXTERNAL HARD DISK WHEN YOU ARE DONE, IT HAS THE SAME FREE SPACE YOUR HD DID.
 
1 members found this post helpful.
Old 02-11-2011, 12:29 PM   #4
ahaveland
LQ Newbie
 
Registered: Jun 2010
Posts: 4

Rep: Reputation: 0
Post

Quote:
Originally Posted by irlandes View Post
Someone on the official forums said this in answer to a question how to clean all slack:

"You can try something like find <path_here> -type f -exec bcwipe -Smd {} \;
Remember, it will be lenghty operation if you have many files there."

I would not trust a command which said "something like" but I bet there is a way if that isn't correct.
Thanks for the info. I just wanted to shrink and gzip a partition so it didn't take up unnecessary space, so after resize2fs, dd, lvresize, pvresize, parted etc, I can confirm that bcwipe works.

This is what I used in each top level dir: (/bin /boot /etc /home /lib /lib64 /root /sbin /usr /var )

for p in /bin /boot /etc /home /lib /lib64 /root /sbin /tmp /usr /var; do
IFS=$'\n'; for i in $(find $p -type d); do
bcwipe -mz -S -v "$i"/*;
done;
done;


It took a good hour or so. I don't think it would be a good idea to run from / and operate on /proc, /sys /dev too.

Crazy that after all these years there still isn't a standard core util to wipe slack and free space.

Andy
 
  


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
partition space and disk space usage and free don't match nsic Linux - Newbie 3 02-22-2013 01:57 PM
Secure unused disk space wipes, dd and shred Akonbobot Linux - Security 10 03-14-2008 02:01 AM
Disk Free Space Ian D Linux - Newbie 1 02-09-2006 08:11 AM
Free up disk space TheShemeta Slackware 5 11-26-2003 05:50 PM
free disk space? Alf829 Linux - Newbie 3 08-01-2003 12:26 PM


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