Questions tagged [shred]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
16 votes
3 answers
4k views

How can I verify that my hard disk has been zeroed / wiped?

I used shred to wipe my external hard disk: sudo shred -vz /dev/sdb I should also add that the disk had 5 bad sectors. I want to verify the disk has been zeroed, per https://superuser.com/questions/...
  • 437
4 votes
3 answers
486 views

Using "shred" on BSD systems

Linux has shred, from the GNU coreutils package, to securely overwrite data in-place when removing files. What is the equivalent on BSD systems (and specifically on macOS)?
0 votes
1 answer
160 views

Shredding one partition messes up whole external drive

I used the "shred" command on Linux to wipe a specific partition on my HDD (just a once-over with zeroes; no extra passes of random data). The command I used: shred -uvz -n 0 /dev/sda But ...
2 votes
1 answer
151 views

Output to variable or file using (find with -exec and shred)

I have a find command that I exec to shred and it works great; however, I need to capture the output of this and pass to a variable or a file. I have tried so many iterations of the below commands, ...
0 votes
0 answers
197 views

Showing output of processed files on yad/zentiy progress bar with shred

Been trying to get a yad progress bar to show the output of processed files along with the progress bar while shredding files. Shredding takes longer and users see the progress bar going back and ...
2 votes
1 answer
334 views

How to use the shred command the right way?

I got to know about shred yesterday. I want to know the proper way of removing files with it. Should I first shred the file and then use rm to remove it? $shred <file> $rm <file> Or ...
1 vote
2 answers
1k views

Filling my hard drive with zeros

I m looking for best and fastest way to remove all my data From hard drive. I M on linux Of you know something with doing this operation on a USB stick share with me. Other ways are also acceptable ...
0 votes
0 answers
70 views

replace remove command (in Linux - overall) with shred

short question: as the title suggests, a system-wide shred instead of the command rm Long question: I know about the "replace" command, as well as I could just to rm = shred (or something on ...
11 votes
1 answer
520 views

Using ddrescue to shred only rescued portions of disk

Magnetic drive has failed. I used ddrescue to recover ~85% of it, with a map file, but the rest is borked and continuing to scrub it would take years. I can return it for a replacement. I'd like to ...
  • 285
0 votes
0 answers
377 views

How to mount a usb harddisk after a interrupted shred

Shred command was interrupted by a unrelated and user induced system halt. Now I'm not able to see the harddisk using lsblk -l. Tried on multiple linux systems. This answer (from External HDD detected,...
  • 259
0 votes
1 answer
351 views

Why is shred's -z option twice as slow?

I'm using shred to wipe a partition, and did some speed testing. My results were, in seconds: 6.4 using /dev/zero as the data source 6.5 shred's default raondom implementation 12.9 using shred's `...
31 votes
5 answers
18k views

Is shred bad for erasing SSDs?

Whenever I sold a drive I've zeroed it once with shred from a live environment: sudo shred -vzn 0 /dev/sdX Before I double-checked it wasn't mounted. This is the fastest way to securely erase a drive ...
  • 437
0 votes
3 answers
1k views

Quicker alternative to Linux Wipe Command for secure deletion

I am fairly new to Linux but all I can say is I love it!!! :D Anyways, I am trying to securely erase 1000s of files from my harddrive because new year is approaching and I want a fresh start to life. ...
-1 votes
1 answer
168 views

CLI Linux with "shred" command

I am trying to find an OS that I can boot from my USB stick without further installation. I tried Tinycore but sadly I just couldnt save the Package "Coreutils" on it, so I had to reinstall it ...
0 votes
0 answers
157 views

How to wipe a partition quickly with value zero? [duplicate]

I want to wipe a partition quickly.I search the answer in website. such as: dd if=/dev/zero of=/dev/sda1 bs=16M count=96 shred -v -z -n 1 /dev/sda1 But: All the commandline,will overwrite with ...
  • 9
0 votes
2 answers
513 views

What does it mean to overwrite a file but keep it?

The wipe tool has the option -k Keep files, i.e. do not remove() them after overwriting. What does that mean not to remove a file that was ... well... wiped?
's user avatar
0 votes
2 answers
4k views

If I shred /dev/sda, do I delete partitions?

If I am wiping my /dev/sda harddrive, do I need to first repartition it (for example, with GParted), or will shred /dev/sda wipe the partition table too?
  • 2,657
0 votes
2 answers
784 views

Is the Secure Erase desired after the shred command? If so, how to do it properly?

I am about to sell a bunch of hard drives (not an SSHD or an SSD, all are normal HDDs). As I wanted to overwrite it literally 10 times, I was unsure how to execute a pure pv overwrite * 10, so I came ...
6 votes
0 answers
7k views

External Drive Recognized by `ls dev` but "no medium found"

I am trying to shred an old external hard drive using Linux Mint 17 (an Ubuntu-based distro) and a Vantec IDE/SATA to USB 3.0 adapter. The system recognizes the presence of the drive. Here is the ...
1 vote
1 answer
800 views

Making a Deleted folder Impossible to Recover [duplicate]

Suppose you visit a bad location on earth with your laptop. Thieves are about to break in and steal your laptop. So you run : rm -rf /folder but what if thieves have very advanced tools to recover ...
's user avatar
5 votes
1 answer
366 views

How secure is data removal with rm followed by zerofree on the partition?

Instead of using srm, wipe or shred, one may simple unlink the file and run zerofree on the involved partition: mount /dev/sda1 /mnt rm /mnt/confidential_file umount /mnt zerofree /dev/sda1 How safe ...
5 votes
3 answers
4k views

Secure delete folder CentOS 7

How do I securely delete a folder, with all of its contents, so it cannot be recovered? I have tried the shred command but it only works with files and not folders. I have also found out that there ...
  • 51
0 votes
1 answer
402 views

SMART test passed but I can see Hard Disk Broken Sectors in Disk Assesment

I have used shred on my HDD, but in the middle of that, I used Ctrl+C combination accidentally. After that I noticed bad sectors on Disk Assessment. I am using Linux mint 18 as my OS. Using fsck, I ...
  • 101
7 votes
1 answer
4k views

How to securely delete data after rm

I deleted a file I meant to shred first. $ rm somefile instead of $ shred somefile $ rm somefile Is there a way to shred a file after 'rm'-ing it?
  • 173
1 vote
1 answer
98 views

Wipe files from an external hard drive but not empty space

I'm using the following command to wipe an external drive. sudo shred -v -z -n 1 /dev/sdb Is it possible to wipe an external drive of the files and not empty space? So it would overwrite where there ...
2 votes
1 answer
2k views

data recovery after partial shred

well i issued the following command: shred -v /dev/sdb. However I wanted to shred /dev/sda. I realized my mistake after about 2gb had been shredded (out of 2.7tb raid volume). what is the ...
  • 121
2 votes
2 answers
2k views

Automatically shred LUKS partition upon X failed decryption attempts?

Is it possible to set up a bootloader that automatically begins shredding the header.img file and then the encrypted partition itself upon X failed attempts at decrypting the partition? If this does ...
  • 382
1 vote
2 answers
1k views

How to delete the whole root with rm rf and shred together?

My task is simple: I need to able to delete the whole root which i can do with rm-rf ./* but the problem here is HFS recovery can get back the data since it is not actually deleted from disk if i ...
2 votes
2 answers
239 views

Did I unintentionally delete my entire hard drive?

A while ago I backed up a Linux folder onto a Windows disk drive I had lying around. Recently I was scanning through those files when I realized that I had unintentionally copied over many unwanted ...
2 votes
1 answer
793 views

What can I (not) shred from root while it is mounted?

I am performing a test migration from old server to new one. Part of the procedure involves cleaning up the old server of any traces of passwords, php scripts and custom configurations while remotely ...
6 votes
3 answers
3k views

How to securely delete a directory without leaving a trace?

I already know that using shred will overwrite my files in such a way that leaves them unrecoverable. However shred can't be used to hide directories. Error Message: failed to open for writing: Is ...
  • 161
2 votes
3 answers
539 views

How can I shred a git repository, reasonably fast?

I'm interested in accurately removing a git repository in a reasonable time. But it takes quite a while to do so. Here, I have a small test repo where the .git folder is < 5MiB. $ du -ac ~/tmp/....
  • 8,407
2 votes
2 answers
374 views

Shredding an external HDD

How do I shred the data on an external HDD? I am trying shred "/media/me/New Volume/" but I get failed to open for writing: Is a directory. Why?
  • 623
7 votes
3 answers
1k views

Effectivity of shred on different file systems

man shred warns that the command is not useful on file systems that don't overwrite in-place. I don't have much knowledge about the current and upcoming file systems, but I would suspect that many of ...
  • 215