Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
3
answers
2154
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. As in remove toxic files, toxic photos etc I am currently using the Linux `wipe` command as in `sudo...
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. As in remove toxic files, toxic photos etc
I am currently using the Linux
wipe
command as in sudo wipe -rcf
but it is taking FOREVER.
I believe because it is doing a wipe 34 times according to Guttmans Algorithm
. I appreciate it is good but are there any quicker alternatives that are safe deletion. I am new to it all as in cyber security but I learnt worrying enough that doing the rm
command on Linux or even permanently deleting from Windows recycle bin isn't safe and is still recoverable as it just hides the files. Hell I am recovering old files haha of my younger self
n00bl1nux
(33 rep)
Dec 24, 2019, 01:44 AM
• Last activity: Nov 20, 2024, 05:00 AM
7
votes
3
answers
1760
views
Effectiveness 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 up and coming file systems, but I would suspect that many of them support some special in-place write mode for this purpose, which is used by shred. Am I...
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 up and coming file systems, but I would suspect that many of them support some special in-place write mode for this purpose, which is used by shred.
Am I right with this assumption? Is it already implemented in shred
? Is there some way of telling without too much trouble (e.g. when a new file system is announced)?
David
(225 rep)
Oct 6, 2012, 12:41 AM
• Last activity: Oct 2, 2024, 04:15 PM
1
votes
0
answers
44
views
Shred command results in faulty keyboard
On at least three Lenovo Laptops, many keys no longer work following the use of the `shred` command. 1. I used a bootable Ubuntu USB key. Within the Ubuntu OS, in the terminal window: - `sudo fdisk -l` - `sudo shred -n10 -v /dev/nvme0n1` 2. Shred runs its course. 3. I then install Windows (10) Then...
On at least three Lenovo Laptops, many keys no longer work following the use of the
shred
command.
1. I used a bootable Ubuntu USB key.
Within the Ubuntu OS, in the terminal window:
- sudo fdisk -l
- sudo shred -n10 -v /dev/nvme0n1
2. Shred runs its course.
3. I then install Windows (10)
Then oddly enough, the keyboard doesn't work (many keys are completely non-functional).
* In the BIOS, the keyboard works fine.
* The hard drive is an NVMe.
How can Ubuntu's shred
result in our keyboards not working?
user653821
(11 rep)
Oct 2, 2024, 02:29 PM
• Last activity: Oct 2, 2024, 02:36 PM
3
votes
1
answers
833
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, but cant seem to get it to work. I also have tried for loops. It always will display to my terminal as...
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, but cant seem to get it to work. I also have tried for loops. It always will display to my terminal as it goes through the shred process, but never writes to a file or variable. I would prefer a variable but will take anything at this point. Please see my examples below:
**Original find command:**
find /burncd/working -type f -exec shred -v -n7 -z --remove {} \;
**Latest try at a command to pass to a file (from StackExchange):**
find /burncd/working/* -type f -exec bash -c 'shred -v -n7 -z --remove "$1" /tmp/find.out' $0 {} \;
I would appreciate any help you could give.
John Riordan
(31 rep)
Jan 24, 2022, 09:02 PM
• Last activity: Jul 26, 2024, 09:04 PM
0
votes
0
answers
380
views
Can `shred` show estimate remaining time?
I used `-vfz` and it shows the size and percentage of current wiped amount, but I would like to see the remaining time. I think I can calculate time myself, because it seems that it wipes about 630 MB per second, but automatic calculation would be nice.
I used
-vfz
and it shows the size and percentage of current wiped amount, but I would like to see the remaining time. I think I can calculate time myself, because it seems that it wipes about 630 MB per second, but automatic calculation would be nice.
Damn Vegetables
(1539 rep)
Nov 19, 2023, 06:33 AM
12
votes
5
answers
47805
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 Anything quick Best regards
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
Anything quick
Best regards
Prince JohNy Freemason
(121 rep)
Feb 27, 2021, 07:46 AM
• Last activity: Jul 18, 2023, 11:31 AM
-1
votes
1
answers
1576
views
How to quickly and securly erase data on a disk?
I'm going to securely erase the data on a HDD so that I can donate it. I use shred which is a specialized the tool for this puprose. So I run `shred -vfz /dev/sdd1` and it does its job: shred: /dev/sdd1: pass 1/4 (random)... shred: /dev/sdd1: pass 1/4 (random)...652MiB/932GiB 0% shred: /dev/sdd1: pa...
I'm going to securely erase the data on a HDD so that I can donate it.
I use shred which is a specialized the tool for this puprose.
So I run
shred -vfz /dev/sdd1
and it does its job:
shred: /dev/sdd1: pass 1/4 (random)...
shred: /dev/sdd1: pass 1/4 (random)...652MiB/932GiB 0%
shred: /dev/sdd1: pass 1/4 (random)...1,2GiB/932GiB 0%
shred: /dev/sdd1: pass 1/4 (random)...1,8GiB/932GiB 0%
shred: /dev/sdd1: pass 1/4 (random)...2,5GiB/932GiB 0%
However it is painfully slow. After an hour or so, it still could not finish the first pass on a 1TB HDD.
So I'm wondering what is the quicker way to do so without compromizing the security of data removal?
P.S. I know that it also can be done using:
dd if=/dev/urandom of=/dev/sdd1 bs=4k
But I'm wondering what will be the differnce in terms of security and speed.
blnks
(219 rep)
May 2, 2023, 06:36 PM
• Last activity: May 2, 2023, 10:32 PM
0
votes
0
answers
1115
views
Why is the shred command so slow at zeroing some models of hard drives? (like Seagate Barracuda ES.2)
When used, with `-n0` (that is without the three initial random passes of the default option) the **shred command is usually fast at zeroing hard drives**: `shred -n0 -z -v -f /dev/sdb` However, I observed that **with some models, the shred command is extremely slow at zeroing**. **Example** (enterp...
When used, with
-n0
(that is without the three initial random passes of the default option) the **shred command is usually fast at zeroing hard drives**:
shred -n0 -z -v -f /dev/sdb
However, I observed that **with some models, the shred command is extremely slow at zeroing**.
**Example** (enterprise grade) model: **ST31000340NS** (Seagate Barracuda ES.2, 1TB 7.2krpm, 32MB cache, SATA II).
Erase commands and observed speeds for the ST31000340NS hard drive:
dd if=/dev/zero of=/dev/sdb status=progress
~ 18-25 MB/s
ddrescue -n -r0 -v -f /dev/zero /dev/sdb
~ 38 MB/s
shred -n0 -z -v -f /dev/sdb
~ 9 MB/s (~35 MB every 4 seconds)
We see that shred
, although performing unique pass of zeros is here more than 4x slower than ddrescue
. Also, for this case, dd
is surprisingly twice slower than ddrescue
.
How to explain such differences in speed?
OuzoPower
(241 rep)
Feb 17, 2023, 05:01 PM
0
votes
0
answers
255
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 those lines) but i thought - How would I go around by replacing **ALL** sort of **Remove** commands/calls in...
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 those lines)
but i thought - How would I go around by replacing **ALL** sort of **Remove** commands/calls in Linux to shred instead?
Like, not only in CLI - but in GUI (E.g with Thunar as well, instead of deleting or empty recycle bin, Thunar would shred the file (first I guess) (then, maybe send it to recycle bin or just delete it right in there)
Note, when I say replace in overall Linux - I mean for every program/cli/command - which removes/deletes a file (**OR a Directory by the way, e.g recursively**).
If this is possible obviously.
Thanks! //Hope all is well with you all.
As usual, if I have made a mistake somewhere, (not only grammar - but anything else) please, do not hesitate to edit. (Even if you are unsure!) or ask for clarification/details.
Off topic below.
+ a side-question (if this is allowed!) How can I tell the "review" program (that reviews a question before it is posted) to review it again?
**NOTE** this is more of a hack than a solution;
I have made a LKM that hooks any "normal" del command and replaces it with a "shred" command; but as said this is more a ""hack"" not an actual, solution.
this is on a test machine by the way, it's too risky to actually use.
and yes it does look like a rootkit someone pointed out :)
Jane
(174 rep)
Feb 4, 2021, 02:20 PM
• Last activity: Jan 12, 2023, 11:08 AM
17
votes
3
answers
10078
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/1510233/is-there-a-faster-way-to-verify-that-a-drive-has-been-fully-zeroed I'm not that familiar w...
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/1510233/is-there-a-faster-way-to-verify-that-a-drive-has-been-fully-zeroed
I'm not that familiar with dd
, but I *believe* that these show it's been zeroed:
sudo dd if=/dev/sdb status=progress | hexdump
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
5000916670976 bytes (5.0 TB, 4.5 TiB) copied, 45754 s, 109 MB/s
9767541167+0 records in
9767541167+0 records out
5000981077504 bytes (5.0 TB, 4.5 TiB) copied, 45756.7 s, 109 MB/s
48c61b35e00
sudo dd if=/dev/sdb status=progress | od | head
5000952267264 bytes (5.0 TB, 4.5 TiB) copied, 45739 s, 109 MB/s
9767541167+0 records in
9767541167+0 records out
5000981077504 bytes (5.0 TB, 4.5 TiB) copied, 45741.1 s, 109 MB/s
0000000 000000 000000 000000 000000 000000 000000 000000 000000
*
110614154657000
But using a simple cmp
shows an exception:
sudo cmp /dev/zero /dev/sdb
cmp: EOF on /dev/sdb after byte 5000981077504, in line 1
Has the disk been zeroed?
NoExpert
(499 rep)
Aug 9, 2022, 10:11 PM
• Last activity: Aug 12, 2022, 01:48 PM
4
votes
3
answers
1539
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)?
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)?
CarriMegrabyan
(163 rep)
Jul 15, 2022, 02:50 PM
• Last activity: Jul 16, 2022, 05:04 PM
0
votes
1
answers
624
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 once it completed the shredding, the disk appeared to have transformed into one homogeneous raw partition that c...
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 once it completed the shredding, the disk appeared to have transformed into one homogeneous raw partition that can't be mounted. The Ubuntu disk utility reads "Contents Unknown" when the device is selected.
I also gave the HDD a look using
dskmgmt
on Windows to get some additional perspective. It gives the following message:
"You must initialize a disk before Logical Disk Manager can access it."
Any idea about what happened?
This was a big shred, by the way. I shredded 2.6 TB of a 3.6 TB HDD.
Is my HDD toast, or the data on my HDD toast?
I do have a backup of just about everything on the HDD on a SSD, so the situation is not dire. But if I could save the disk contents somehow, that would be really nice. I understand that there is recovery software but I wanted to reach out to the community for some advice: perhaps there is a simpler fix, or perhaps I could get a recommendation of recovery softawre to use?
Thanks for the help.
PS There were multiple partitions on the HDD (e.g. sda1, sda 4). So I did not inadvertently shred the whole thing. Also, as it was shredding, I could see in the terminal that the total size to be shredded was the expected size -- only 2.6 of the 3.6 TB.
---
Hmmm... okay. Before I shredded the thing, I was thinking the same thing: "isn't sda
the whole device?" But when I was looking at the partitions on the Disk Utility one was labeled sda0
another sda1
etc. and then the partition I wanted to shred was simply labeled sda
. I wonder why that would be the case. Perhaps because it was simply unformatted space on the drive and not a partition proper? (I can't remember whether or not I formatted the space prior to shredding.)
user528665
(1 rep)
Jun 6, 2022, 06:38 PM
• Last activity: Jun 7, 2022, 04:48 PM
39
votes
5
answers
40738
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 I know of. Now I've heard it's bad for SSDs. Is there a way to securely erase an SSD that's as fast...
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 I know of. Now I've heard it's bad for SSDs. Is there a way to securely erase an SSD that's as fast or faster?
From a theoretical standpoint I understand that you need to overwrite the whole volume in order to make recovery impossible. So I don't see how there's a way that would put less strain on a SSD. I was told a single pass won't decrease a SSD's life span at all.
Would
cat /dev/zero > /dev/sdX
be as fast?
I'm not dealing with sensitive data here and don't need to protect the drive from a knowledgeable person going to great length to recover data. Fast is what I need while not decreasing the SSD's life span.
Edit: would this work for a SSD just like for a HDD?
dd if=/dev/urandom of=/dev/sdc bs=1M count=2
H3R3T1K
(517 rep)
Jun 16, 2020, 09:01 AM
• Last activity: Nov 21, 2021, 07:09 AM
2
votes
1
answers
2651
views
How to use the shred command the right way?
I got to know about [`shred`][1] yesterday. I want to know the proper way of removing files with it. Should I first shred the file and then use [rm][2] to remove it? > **$**`shred ` > **$**`rm ` Or should I just use the shred command with the `-u` option? >**$**`shred -u ` **Which of these is better...
Wade Wayne
(121 rep)
Jun 28, 2021, 01:00 PM
• Last activity: Jun 29, 2021, 11:08 AM
11
votes
1
answers
1114
views
Using ddrescue to shred only rescued portions of disk
1. Magnetic drive has failed. 2. 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. 3. I can return it for a replacement. 4. I'd like to shred my data first. 5. When I try to write to it, it works for the first few hundred MB b...
1. Magnetic drive has failed.
2. 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.
3. I can return it for a replacement.
4. I'd like to shred my data first.
5. When I try to write to it, it works for the first few hundred MB but then starts pouring input/output errors and the drive becomes completely unavailable (/dev/sdd no longer exists).
So is it possible to use the map file from item 2 to write random data only to the portions of the drive that were recoverable and not attempt to write to the bad blocks?
endolith
(314 rep)
Dec 3, 2020, 03:47 PM
• Last activity: Dec 4, 2020, 03:47 AM
0
votes
0
answers
457
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][1] (from [External HDD detected, but not recognised. Cannot mount, cannot format, cannot do partition][2]) points to extern...
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, but not recognised. Cannot mount, cannot format, cannot do partition ) points to external power which I doubt as cause since I was able to shred in first place.
journalctl -b
Nov 03 15:48:44 x kernel: usb 1-1.1.4: new high-speed USB device number 7 using ehci-pci
Nov 03 15:48:44 x kernel: usb 1-1.1.4: New USB device found, idVendor=174c, idProduct=55aa, bcdDevice= 1.00
Nov 03 15:48:44 x kernel: usb 1-1.1.4: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Nov 03 15:48:44 x kernel: usb 1-1.1.4: Product: ASMT1051
Nov 03 15:48:44 x kernel: usb 1-1.1.4: Manufacturer: asmedia
Nov 03 15:48:44 x kernel: usb 1-1.1.4: SerialNumber: 123456789012
Nov 03 15:48:44 x kernel: usb-storage 1-1.1.4:1.0: USB Mass Storage device detected
Nov 03 15:48:44 x kernel: usb-storage 1-1.1.4:1.0: Quirks match for vid 174c pid 55aa: 400000
Nov 03 15:48:44 x kernel: scsi host6: usb-storage 1-1.1.4:1.0
Nov 03 15:48:44 x kernel: usbcore: registered new interface driver usb-storage
Nov 03 15:48:44 x kernel: usbcore: registered new interface driver uas
Nov 03 15:48:45 x kernel: scsi 6:0:0:0: Direct-Access ASMT 2105 0 PQ: 0 ANSI: 6
Nov 03 15:48:45 x kernel: sd 6:0:0:0: [sdb] Spinning up disk...
Nov 03 15:50:47 x kernel: sd 6:0:0:0: [sdb] Read Capacity(16) failed: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Nov 03 15:50:47 x kernel: sd 6:0:0:0: [sdb] Sense Key : Not Ready [current]
Nov 03 15:50:47 x kernel: sd 6:0:0:0: [sdb] Add. Sense: Logical unit is in process of becoming ready
Nov 03 15:51:07 x kernel: sd 6:0:0:0: [sdb] Read Capacity(10) failed: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Nov 03 15:51:07 x kernel: sd 6:0:0:0: [sdb] Sense Key : Not Ready [current]
Nov 03 15:51:07 x kernel: sd 6:0:0:0: [sdb] Add. Sense: Logical unit is in process of becoming ready
Nov 03 15:51:07 x kernel: sd 6:0:0:0: [sdb] 0 512-byte logical blocks: (0 B/0 B)
Nov 03 15:51:07 x kernel: sd 6:0:0:0: [sdb] 0-byte physical blocks
Nov 03 15:51:14 x kernel: sd 6:0:0:0: [sdb] Test WP failed, assume Write Enabled
Nov 03 15:51:21 x kernel: sd 6:0:0:0: [sdb] Asking for cache data failed
Nov 03 15:51:21 x kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write through
Nov 03 15:51:21 x kernel: sd 6:0:0:0: [sdb] Spinning up disk...
Nov 03 15:53:22 x kernel: sd 6:0:0:0: [sdb] Read Capacity(16) failed: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Nov 03 15:53:22 x kernel: sd 6:0:0:0: [sdb] Sense Key : Not Ready [current]
Nov 03 15:53:22 x kernel: sd 6:0:0:0: [sdb] Add. Sense: Logical unit is in process of becoming ready
Nov 03 15:53:43 x kernel: sd 6:0:0:0: [sdb] Read Capacity(10) failed: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Nov 03 15:53:43 x kernel: sd 6:0:0:0: [sdb] Sense Key : Not Ready [current]
Nov 03 15:53:43 x kernel: sd 6:0:0:0: [sdb] Add. Sense: Logical unit is in process of becoming ready
Nov 03 15:53:57 x kernel: sd 6:0:0:0: [sdb] Attached SCSI disk
Nov 03 15:56:15 x kernel: sd 6:0:0:0: [sdb] Spinning up disk...
Nov 03 15:58:16 x kernel: sd 6:0:0:0: [sdb] Read Capacity(16) failed: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Nov 03 15:58:16 x kernel: sd 6:0:0:0: [sdb] Sense Key : Not Ready [current]
Nov 03 15:58:16 x kernel: sd 6:0:0:0: [sdb] Add. Sense: Logical unit is in process of becoming ready
Nov 03 15:58:37 x kernel: sd 6:0:0:0: [sdb] Read Capacity(10) failed: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Nov 03 15:58:37 x kernel: sd 6:0:0:0: [sdb] Sense Key : Not Ready [current]
Nov 03 15:58:37 x kernel: sd 6:0:0:0: [sdb] Add. Sense: Logical unit is in process of becoming ready
The shred command:
sudo shred -vzn 0 /dev/sdb
lsblk -l
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 119.2G 0 disk
sda1 8:1 0 100M 0 part /boot/efi
sda2 8:2 0 250M 0 part /boot
sda3 8:3 0 118.9G 0 part
luks 254:0 0 118.9G 0 crypt
Arch-swap 254:1 0 512M 0 lvm [SWAP]
Arch-root 254:2 0 118.4G 0 lvm /
jjk
(445 rep)
Nov 4, 2020, 09:48 AM
• Last activity: Nov 4, 2020, 02:44 PM
1
votes
2
answers
4688
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?
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?
lofidevops
(3349 rep)
Jan 3, 2018, 11:17 AM
• Last activity: Sep 26, 2020, 08:04 AM
0
votes
1
answers
867
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 `-z` option ``` Why is `-z` twice as slow? Here is the detail: ``` # time shred -z -s 256M -n 1 /de...
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 -z
option
Why is -z
twice as slow? Here is the detail:
# time shred -z -s 256M -n 1 /dev/sdc1
shred -z -s 256M -n 1 /dev/sdc1 0.14s user 0.05s system 1% cpu 12.919 total
# time shred -s 256M -n 1 /dev/sdc1
shred -s 256M -n 1 /dev/sdc1 0.14s user 0.02s system 2% cpu 6.509 total
# time shred --random-source=/dev/zero -s 256M -n 1 /dev/sdc1
shred --random-source=/dev/zero -s 256M -n 1 /dev/sdc1 0.00s user 0.06s system 0% cpu 6.419 total
(I am using Linux Mint 20 on an external USB 2.0 magnetic drive formatted as ExFAT.)
Keith Bennett
(345 rep)
Aug 17, 2020, 09:55 PM
• Last activity: Aug 17, 2020, 10:22 PM
-1
votes
1
answers
247
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 everytime I reboot the system. It is important that I can use the "shred" command. Because the USBsticks on...
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 everytime I reboot the system. It is important that I can use the "shred" command. Because the USBsticks only purpose will be to shred old PCs. Also I dont want to connect the PCs to network. Pretty much just boot from the usb and type the command. I prefer Command line only, because a GUI is just not necessary.
Thank you.
NewbieLinux
(1 rep)
Nov 11, 2019, 01:07 PM
• Last activity: Nov 13, 2019, 12:13 PM
0
votes
0
answers
163
views
How to wipe a partition quickly with value zero?
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 value zero though there is zero. I think in the partition somewhere have value,but somewhere also h...
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 value zero though there is zero.
I think in the partition somewhere have value,but somewhere also have zero.
**Want**:
Just use commandline but not GUN.**Because ddrescue Need to** **compile** and install
dd
or shred
or other command just overwrite zero to where that there's value is not zero in a partition in Linux.
---
Update:
My understand is in below
Now:
ddrescue -b 1572864 --generate-mode /dev/zero /dev/sda1 flash.map
// This will create a flash.map
ddrescue -b 1572864 --force --fill-mode=+ /dev/zero /dev/sda1 flash.map
//will to fill the patition by flash.map
//1572864byte =16M*96
It's right?What about my understand?
Zchme
(9 rep)
Apr 16, 2019, 04:25 PM
• Last activity: Apr 16, 2019, 08:05 PM
Showing page 1 of 20 total questions