Linux shred command to thoroughly smash and delete files

Source: Internet
Author: User

Using the rm DELETE command in linux to delete a file only recycles the inode of the file. This does not mean that the block is completely cleared, for details, refer to my previous blog post "Understanding the linux File System in depth ".

To delete the rm command, we can use tools like ext3grep and photorec before the partition of the deleted file is overwritten into new data. What if we want to completely delete a file?

The shred command is also applicable in the data = ordered (default) anddata = writeback mode of ext3/ext4.

# Shred-f-u-v-z file name

-F change permissions to allow writing if necessary-u truncate and remove file after overwriting-v be verbose (detailed) and show progress-z add a final overwrite with zeros to hide shredding

Unzip shred-f-u-z-vtest.txt

650) this. width = 650; "title =" shred.jpg "alt =" 095301553.jpg" src = "http://www.bkjia.com/uploads/allimg/131228/0015554E2-0.jpg"/>

Although the shred command can safely erase data from the hard disk, note that it cannot be used on bad sectors. In addition, the shred command is more secure to connect to a complete partition path than to get a file name, because some types of file systems will keep backups, and often the shred command will not delete these backup files.

# Shred/dev/sda1

This article is from the "Old Xu's Private food" blog and will not be reposted!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.