Saturday 10 October 2015

Using Shred In linux.



Shred is one of the best utilities if you want to delete the files safely and permanently. Shred command overwrite a given file with random data or zeros making it hard to interpret to the intruders even after deleting your file. Say, you have a very confidential file which you want to delete because your company don't need it anymore, you will probably delete it permanently. You know what happens when you delete a file ? Whenever you delete a file only the link between your data and the file system is removed by the system. The data still remains in your hard drive and that's why even after deleting your data it is still recoverable.




Shred command basically adds random data inside your file which makes it hard or almost impossible to interpret. Hence even if your file is recovered from the hard drive it is still hard to interpret by the intruders.




Since shred command is used to permanently delete the file with absolutely no possible chance to recover it it's highly recommended to use it carefully.




Let's take an example:




# shred -n 50 -z -u secret.txt




The -n 50 means that the file "secret.txt" will be overwritten 50 times. The -z means add a final overwrite with zeros to hide the shredding. The -u makes sure the file is removed after shred is done with it.




You can shred a complete drive or partition too:
(Be very Careful doing this as this command completely wipe all your data ie. zero formatting it.)




# shred -n 50 -z /dev/sda



## HOPE THIS BLOG HELP YOU OUT## 

~SHUBHAM

No comments:

Post a Comment