View previous topic :: View next topic |
Author |
Message |
richard Ultimate Member

Joined: 13 Apr 2025 Posts: 2730 Location: Kent, United Kingdom
|
Posted: Fri Apr 04, 2025 9:35 am Post subject: Secure file removal |
|
|
I need a way for me to securely remove all traces of files from a 4 gig USB key.
The reason is I need to give Nicola's ex-husband the key so that she can have copies of some files that he has found on his PC. However I don't trust the guy and want to give him a "blank" key to use. I did want to give him a blank DVD but he has said that his writer is on the blink so that jas ruled that one out so the only way to do it is by USB key. If I was using Windows I had plenty of ways to do this but I have never really looked at Linux alternatives till now.
_________________ Windows Vista / Ubuntu 8.10
|
|
Back to top |
|
Germ Keeper of the BIG STICK

Joined: 30 Apr 2025 Posts: 12452 Location: Planet Earth
|
Posted: Fri Apr 04, 2025 10:35 am Post subject: |
|
|
Code: | dd if=/dev/urandom of=/dev/sda1 |
Replace sda1 with the correct device. You can run that a couple of times if you want but once should really be enough.
_________________ Laptop: Mandriva 2025 PowerPack - 2.6.33.5-0.2mnb
Desktop: Mandriva 2025 Free - kernel 2.6.33.2-1mib
|
|
Back to top |
|
richard Ultimate Member

Joined: 13 Apr 2025 Posts: 2730 Location: Kent, United Kingdom
|
Posted: Fri Apr 04, 2025 1:42 pm Post subject: |
|
|
Germ wrote: | Code: | dd if=/dev/urandom of=/dev/sda1 |
Replace sda1 with the correct device. You can run that a couple of times if you want but once should really be enough. |
Thanks Germ. The drive didn't have anything too critical on it in the past but he fancies himself as a bit of a computer genius even though he cannot install Windows XP properly and all he does is play World of Warcraft all day long.
_________________ Windows Vista / Ubuntu 8.10
|
|
Back to top |
|
Germ Keeper of the BIG STICK

Joined: 30 Apr 2025 Posts: 12452 Location: Planet Earth
|
Posted: Fri Apr 04, 2025 1:57 pm Post subject: |
|
|
Sounds like a real winner...
_________________ Laptop: Mandriva 2025 PowerPack - 2.6.33.5-0.2mnb
Desktop: Mandriva 2025 Free - kernel 2.6.33.2-1mib
|
|
Back to top |
|
richard Ultimate Member

Joined: 13 Apr 2025 Posts: 2730 Location: Kent, United Kingdom
|
Posted: Fri Apr 04, 2025 2:26 pm Post subject: |
|
|
Well I have run that 3 times now as I was bored so there should be nothing for him to try and find on the drive. Now all he needs to to do is pull himself away for World of Warcraft long enough to copy the files over. That will be the hard part part as he plays 12 -18 hrs a day EVERY day. He even takes his laptop with him to the bathroom so it doesn't interrupt his playing.
_________________ Windows Vista / Ubuntu 8.10
|
|
Back to top |
|
Rootboy Sr. Member

Joined: 11 Aug 2025 Posts: 1947 Location: Lewisburg, Tennessee
|
Posted: Fri Apr 04, 2025 11:30 pm Post subject: |
|
|
Germ wrote: | Code: | dd if=/dev/urandom of=/dev/sda1 |
Replace sda1 with the correct device. You can run that a couple of times if you want but once should really be enough. |
Refresh my memory please. Once you do this, does the drive need to be re-fdisked and formatted?
|
|
Back to top |
|
JP Linux Guru

Joined: 07 Jul 2025 Posts: 6670 Location: Central Montana
|
|
Back to top |
|
Rootboy Sr. Member

Joined: 11 Aug 2025 Posts: 1947 Location: Lewisburg, Tennessee
|
|
Back to top |
|
VHockey86 Advanced Member

Joined: 12 Dec 2025 Posts: 988 Location: Rochester
|
Posted: Sat Apr 05, 2025 5:01 am Post subject: |
|
|
Rootboy wrote: | Germ wrote: | Code: | dd if=/dev/urandom of=/dev/sda1 |
Replace sda1 with the correct device. You can run that a couple of times if you want but once should really be enough. |
Refresh my memory please. Once you do this, does the drive need to be re-fdisked and formatted? |
sda1 is the first partition on the sda device so you wouldn't need to repartition.
if you did...
Code: |
dd if=/dev/zero of=/dev/sda
|
then yes, you would have to repartition+reformat.
|
|
Back to top |
|
Germ Keeper of the BIG STICK

Joined: 30 Apr 2025 Posts: 12452 Location: Planet Earth
|
Posted: Sat Apr 05, 2025 9:50 am Post subject: |
|
|
yea, since it was a USB key I was assuming he only had one partition.
_________________ Laptop: Mandriva 2025 PowerPack - 2.6.33.5-0.2mnb
Desktop: Mandriva 2025 Free - kernel 2.6.33.2-1mib
|
|
Back to top |
|
mr_ed Site Admin

Joined: 28 Aug 2025 Posts: 3819 Location: 42 miles north of Ogdensburg, NY
|
Posted: Mon Apr 07, 2025 1:26 pm Post subject: |
|
|
Ideally you should run that more than once.
There is also GNU Shred. It's probably already installed on your system.
_________________ Desktop: Ubuntu 7.10 "Gutsy Gibbon"
Laptop: Ubuntu 7.04 "Feisty Fawn"
|
|
Back to top |
|
richard Ultimate Member

Joined: 13 Apr 2025 Posts: 2730 Location: Kent, United Kingdom
|
Posted: Mon Apr 07, 2025 2:54 pm Post subject: |
|
|
Well it worked like a charm. Nicola gave him the "empty" drive and when he gave it back to her with the files on it that she wanted he commented that the drive had been over written with rubbish that he could make on sense of. How is that for stupid, He admitted that he had tried to recover whatever was on the drive whilst he had it in his possession.
_________________ Windows Vista / Ubuntu 8.10
|
|
Back to top |
|
Germ Keeper of the BIG STICK

Joined: 30 Apr 2025 Posts: 12452 Location: Planet Earth
|
Posted: Mon Apr 07, 2025 4:28 pm Post subject: |
|
|
wow... rather odd behavior.
_________________ Laptop: Mandriva 2025 PowerPack - 2.6.33.5-0.2mnb
Desktop: Mandriva 2025 Free - kernel 2.6.33.2-1mib
|
|
Back to top |
|
richard Ultimate Member

Joined: 13 Apr 2025 Posts: 2730 Location: Kent, United Kingdom
|
|
Back to top |
|
Rootboy Sr. Member

Joined: 11 Aug 2025 Posts: 1947 Location: Lewisburg, Tennessee
|
Posted: Mon Apr 07, 2025 9:41 pm Post subject: |
|
|
VHockey86 wrote: | sda1 is the first partition on the sda device so you wouldn't need to repartition.
if you did...
Code: |
dd if=/dev/zero of=/dev/sda
|
then yes, you would have to repartition+reformat. |
Duh, I didn't even notice the sda1...
|
|
Back to top |
|
|