0

I have been reading for a while on how rm, fdisk and dd work. I wasn't able to fully understand their source code however. Let's assume I would like to delete my /dev/nvme0n1p3 partition and the files within it which I mounted on /mnt/to_remove

Assume, I try these 3 commands below:

rm -rf /mnt/to_remove

dd if=/dev/zero of=/dev/nvme0n1p3

fdisk /dev/nvme0n1 -> d -> 3

I know that the dd command above will write 0s to all the sectors within /dev/nvme0n1p3. Just making sure I understand the rm and fdisk. Deleting using fdisk will remove the record of /dev/nvme0n1p3 from the partition table. rm will remove the directory and file listings off that partition. Is this correct? In that case, the data is recoverable if I remove them using rm or fdisk?

0 Answers0