Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Security and Privacy
FedoraForum Search

Forgot Password? Join Us!

Security and Privacy Sadly, malware, spyware, hackers and privacy threats abound in today's world. Let's be paranoid and secure our penguins, and slam the doors on privacy exploits.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 1st May 2005, 09:57 PM
jacobsh Offline
Registered User
 
Join Date: Dec 2004
Posts: 41
deleting already deleted files

I'm not sure if this has been answered before, but seaching for my answer proved difficult. I have deleted numerous files that should have been deleted securely, like with the gutmann-35 pass algorithm or something. But they weren't. They were just plain deleted.

So, my question is this. Is there any *safe* way to delete those files securely, even after Fedora has marked them as deleted so I can't see them?

I hope this makes sense. Thanks!
Reply With Quote
  #2  
Old 2nd May 2005, 05:22 AM
james_in_denver Offline
Registered User
 
Join Date: Oct 2004
Posts: 1,227
yes,

"man shred"
__________________
Only dead fish go with the flow....

Hmmm, what did I miss?
Reply With Quote
  #3  
Old 2nd May 2005, 05:49 AM
jacobsh Offline
Registered User
 
Join Date: Dec 2004
Posts: 41
I'm confused. It seems like shred requires you to supply a file name, which I do not have. Perhaps you've misunderstood me. I basically want to take all the free space on my drive and write random data over it so that previously deteled files cannot be recovered.

Perhaps it's me who's just not getting it. I've read "man shred" and I still don't have an answer to my problem. If shred can be used for this purpose, how would one go about doing it? Thanks,

Jacob
Reply With Quote
  #4  
Old 2nd May 2005, 06:34 AM
w5set Offline
Registered User
 
Join Date: Feb 2005
Location: ark n saw out in the sticks
Posts: 2,316
free space as in unpartitioned space of a previous install of a distro--OS or whatever?
or just free space in a directory you deleted stuff from?
Reply With Quote
  #5  
Old 2nd May 2005, 08:33 AM
james_in_denver Offline
Registered User
 
Join Date: Oct 2004
Posts: 1,227
the "shred" command is for erasing files BEFORE you delete them

If you have already deleted the files, just use "dd if=/dev/random of=whatever.erase bs=512 count=how_many_512B_blocks_are_ree_on_the_file_sys tem"

then "shred whatever.erase", then "rm whatever.erase"....

that should do the trick..........................
__________________
Only dead fish go with the flow....

Hmmm, what did I miss?
Reply With Quote
  #6  
Old 2nd May 2005, 08:35 AM
AndyGreen Offline
Registered User
 
Join Date: Apr 2005
Location: Northants, UK
Posts: 2,026
dd the freespace --> Nice idea James!

--edit

You'll need /dev/urandom I believe unless you have a quantum coffecup hooked up to the PC ;-)
__________________
Freelance RedHat Certified Engineer - http://northantsIT.com

Last edited by AndyGreen; 2nd May 2005 at 08:46 AM.
Reply With Quote
  #7  
Old 2nd May 2005, 08:41 AM
cruiseoveride Offline
Registered User
 
Join Date: Mar 2005
Location: Canada
Posts: 644
impressive james_in_denver
__________________
Registered Linux User no. 335484 :cool:
An RHCE guy, and wannabe RHCA :cool:
--------------------------------------------------------
Get Counted at http://counter.li.org/
---------------------------------------------------------------------------------------------------------------------------------------------------------
AMD X3 710, ASUS M4N78-Pro, Visiontek ATi HD4870, Corsair 2GB Dual Channel Kit, 6x500Gb Western Digital Disks LVM2+RAID5
Reply With Quote
  #8  
Old 2nd May 2005, 08:44 AM
cruiseoveride Offline
Registered User
 
Join Date: Mar 2005
Location: Canada
Posts: 644
give us a little theory behind that post of urs james_in_denver
__________________
Registered Linux User no. 335484 :cool:
An RHCE guy, and wannabe RHCA :cool:
--------------------------------------------------------
Get Counted at http://counter.li.org/
---------------------------------------------------------------------------------------------------------------------------------------------------------
AMD X3 710, ASUS M4N78-Pro, Visiontek ATi HD4870, Corsair 2GB Dual Channel Kit, 6x500Gb Western Digital Disks LVM2+RAID5
Reply With Quote
  #9  
Old 2nd May 2005, 08:55 AM
tejas Offline
Registered User
 
Join Date: Feb 2005
Location: Bangalore
Age: 27
Posts: 1,574
Looks like james_in_denver is creating a large file with lots of arbitrary data written across the whole disk.

This way, wherever the useful data is hiding, it will be replaced by james' large file.

The theory is that any data that could have been recovered is replaced with this arbitrary values.

The large file is then shredded, so that even if it is recovered, you will recover the junk file.

Pretty smart way, but dangerous if you get file size wrong.

Does anyone actually know a good way to get such data back? McAfee in windoze used to be good at this
__________________
I Was Counted! Registered Linux User #384707

BASH && Beer && Bass! Now THAT makes sense!!

Last edited by tejas; 2nd May 2005 at 09:00 AM.
Reply With Quote
  #10  
Old 2nd May 2005, 09:01 AM
cruiseoveride Offline
Registered User
 
Join Date: Mar 2005
Location: Canada
Posts: 644
i know that, i wanted to know more about wat the commands are actually doing physically
__________________
Registered Linux User no. 335484 :cool:
An RHCE guy, and wannabe RHCA :cool:
--------------------------------------------------------
Get Counted at http://counter.li.org/
---------------------------------------------------------------------------------------------------------------------------------------------------------
AMD X3 710, ASUS M4N78-Pro, Visiontek ATi HD4870, Corsair 2GB Dual Channel Kit, 6x500Gb Western Digital Disks LVM2+RAID5
Reply With Quote
  #11  
Old 2nd May 2005, 09:11 AM
AndyGreen Offline
Registered User
 
Join Date: Apr 2005
Location: Northants, UK
Posts: 2,026
dd is like a lowlevel version of cp, cruise. Instead of copying around whole files it only copies blocks of data, of the size and amount of them you say. So to create 1MByte of zeros

dd if=/dev/zero of=yourfile bs=1024 count=1024

ie, copy 1024 blocks each of 1024 bytes from /dev/zero (it always says 0) to yourfile.

/dev/zero would not have been a good source for James' trick because files consisting only of zeros can be stored "sparse", ie, they are created without allocating the sectors to hold the data just by marking the file as "full of a million zeros". Only when the zeros are overwritten are sectors allocated to hold the nonzero blocks.

/dev/random tries to give you a random byte, but in fact will stall if it "runs out of randomness". That's why /dev/urandom is better because it will just provide "not so random" numbers when it "runs out of randomness" rather than halting until it collects "more randomness" from interrupts, etc.
__________________
Freelance RedHat Certified Engineer - http://northantsIT.com
Reply With Quote
  #12  
Old 2nd May 2005, 07:29 PM
cruiseoveride Offline
Registered User
 
Join Date: Mar 2005
Location: Canada
Posts: 644
are there any gui programs for undeleting files in linux
__________________
Registered Linux User no. 335484 :cool:
An RHCE guy, and wannabe RHCA :cool:
--------------------------------------------------------
Get Counted at http://counter.li.org/
---------------------------------------------------------------------------------------------------------------------------------------------------------
AMD X3 710, ASUS M4N78-Pro, Visiontek ATi HD4870, Corsair 2GB Dual Channel Kit, 6x500Gb Western Digital Disks LVM2+RAID5
Reply With Quote
  #13  
Old 2nd May 2005, 11:59 PM
jacobsh Offline
Registered User
 
Join Date: Dec 2004
Posts: 41
Yes. I'm sure a forum search would reveal lots that do that exact thing. Hence my paranoia.
Reply With Quote
  #14  
Old 18th May 2005, 05:57 AM
james_in_denver Offline
Registered User
 
Join Date: Oct 2004
Posts: 1,227
LOL, thanks all, it's been a while since I viewed this thread.......

and the "dd" command I specified above will work even if the "count" value you use is set to a value larger than freespace on the disk.....

Just that the "dd" command will use up ALL of the available freespace and then error out if you specify "count" as being being larger than the freespace on the disk......

Then you can shred away to your heart's content and delete the file when you are done.......

all previous freespace will be "free again", and totally scrubbed......
__________________
Only dead fish go with the flow....

Hmmm, what did I miss?
Reply With Quote
  #15  
Old 18th May 2005, 06:09 AM
tejas Offline
Registered User
 
Join Date: Feb 2005
Location: Bangalore
Age: 27
Posts: 1,574
I've always had a doubt in dd, but too lazy to try it out [this really didn't deserve a new thread].

Lets say I have a 1Mb .img disk image.
and a 1.44 Mb floppy disk.

If I do a
$ dd if=boot.img of=/dev/fd0

will there still be the .44Mb left free, or is the disk considered to be closed [filling up the first 1Mb]
__________________
I Was Counted! Registered Linux User #384707

BASH && Beer && Bass! Now THAT makes sense!!
Reply With Quote
Reply

Tags
deleted, deleting, files

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting inaccesible files? Pizearke Using Fedora 4 18th May 2009 02:18 AM
Deleting files in KDE wombat53 Using Fedora 5 8th March 2009 09:57 PM
deleting files in sub-directories Wayne Using Fedora 16 21st December 2006 12:01 AM
Arrrggh! Deleted a folder I didn't want deleting! tizwoz Using Fedora 1 19th October 2006 07:58 PM
Deleting tmp files satimis Using Fedora 7 1st November 2004 04:32 AM


Current GMT-time: 09:18 (Thursday, 23-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Kati - Shobara - Dar el Beida