LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy
User Name
Password
Puppy This forum is for the discussion of Puppy Linux.

Notices


Reply
  Search this Thread
Old 03-02-2016, 07:33 PM   #1
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Rep: Reputation: 169Reputation: 169
Photorec - does not make sense


I used Photorec and it recovered over 20 Gb of files.

But my whole installation is only 11 Gb.

What's up with that ? :-)
 
Old 03-02-2016, 08:38 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,345
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
Files that are "deleted" are not actually deleted; the pointers to them are removed. Data remains on the drive until it is overwritten by newer files. As photorec looks at data on the hard drive, it may recover all or parts of files that the system considers "deleted," that is, used space available for reuse.

This article goes into greater depth. http://www.webopedia.com/DidYouKnow/...eted_Files.asp
 
Old 03-02-2016, 08:58 PM   #3
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Interesting, similar to what Windows does.

If I want to make sure files are unrecoverable, what would I do ?

I saw shredders, but I would like a method that is not specific to one file.

In Windows, a defrag would do that, but the ext3 system does not need defragging.

Last edited by Fixit7; 03-02-2016 at 09:10 PM.
 
Old 03-02-2016, 09:28 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Most every Linux has the shred command. Details on what it does at the link below.

http://www.techrepublic.com/blog/lin...es-with-shred/
 
Old 03-02-2016, 11:49 PM   #5
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Code:
dd if=/dev/zero of=/bigfatfile
rm /bigfatfile
Repeat for each filesystem you want to 'clean'.
 
Old 03-04-2016, 03:08 PM   #6
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Tried it on a flash drive.

Photorec recovered files after it was run ??

How do I know when it has finished ?

Last edited by Fixit7; 03-04-2016 at 03:24 PM.
 
Old 03-04-2016, 03:41 PM   #7
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by Fixit7 View Post
Tried it on a flash drive.

Photorec recovered files after it was run ??
So you stopped it before it finished?
Quote:

How do I know when it has finished ?
When it stops.
 
Old 03-04-2016, 03:45 PM   #8
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Shred ought to USB flash drive, if that's what you mean? If you're referring to an SSD it ought to also and there's the fstrim command to wipe free space.
I believe that, for spinning drives, shred can be set to clear non-used space also.
The key to any of this though is to think about this before you start using a drive and set things up so that it's easier to ensure all data is removed. There's no use, for example, in simply reformating the disk you're suing and installing again from scratch as the remnants of all old files not written over will still be there.
So, take a step back: How did your drive get into the state it is in? How would you like it to be? What type of drive is it? How can people here help?
 
Old 03-04-2016, 03:58 PM   #9
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
I just want to make deleted files unrecoverable.

These also did not work.

Quote:
fallocate -l 10G gentoo_root.img

truncate -s 10M output.file
Looks like I will have to write a file the same size as the flash drive's capacity.
 
Old 03-04-2016, 04:00 PM   #10
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Did you use shred?
 
Old 03-04-2016, 04:04 PM   #11
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by Fixit7 View Post
Looks like I will have to write a file the same size as the flash drive's capacity.
Which is precisely what the dd command does.
 
Old 03-04-2016, 04:10 PM   #12
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by descendant_command View Post
Which is precisely what the dd command does.
I don't think writing zeros over a file does anything on a flash drive, or an SSD. Something to do with wear-limiting and not making unneeded writes.
Edit: Oh, there's also that fact that even on a spinny disk where the data is gone the file record will sti;l be there so potorec might still see that?

Last edited by 273; 03-04-2016 at 04:12 PM.
 
Old 03-04-2016, 04:16 PM   #13
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
shred or "srm" ( there are two different versions of this program )

srm is "secure rm "

but on a journaled file system shred or srm might not work

using dd to make a all zero .bin file and fill up the drive will remove files that are still there after shred,srm, or delete

or

really overwrite things with images
grab hundreds of G rated images from google -- random images

and copy them a few times and recopy that , then recopy that
very soon you will have 50 gigs then 100 gigs then 200 gigs

Last edited by John VV; 03-04-2016 at 04:19 PM.
 
Old 03-04-2016, 04:26 PM   #14
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Quote:
Originally Posted by 273 View Post
I don't think writing zeros over a file does anything on a flash drive, or an SSD. Something to do with wear-limiting and not making unneeded writes.
Edit: Oh, there's also that fact that even on a spinny disk where the data is gone the file record will sti;l be there so potorec might still see that?
It actually made deleted files unrecoverable by writing over the entire disk space.

Photorec could find nothing to recover. :-)

Less than 10 minutes to write a 4 Gb file.
 
1 members found this post helpful.
Old 03-04-2016, 04:33 PM   #15
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by Fixit7 View Post
It actually made deleted files unrecoverable by writing over the entire disk space.

Photorec could find nothing to recover. :-)

Less than 10 minutes to write a 4 Gb file.
Thanks. This is bringing back memories of a similar thread and I've a feeling that the actual flash cells aren't changed but as long as they're not removed form the device the files can't be seen. Sorry, my memory isn't what it was.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Does this make sense? Linux_Kidd Linux - Networking 3 05-31-2013 08:03 AM
What sense does this make (Javascript)? resetreset Programming 3 12-04-2010 12:16 AM
This just doesn't make any sense! FreezEy Debian 8 04-18-2006 08:35 PM
How does this make sense? Trinity22 Linux - General 2 03-30-2005 12:45 AM
Ya sure this make sense Edward78 General 2 09-23-2003 03:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy

All times are GMT -5. The time now is 03:53 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