How to destroy a Confidential File completely in linux (Shred)

Some times you may worry if you accidentally delete a file. then after a Google you would be satisfied with the tools like getdataback, recovermyfile, foremost etc. Consider a situation that you have borrowed a pendrive from your friend or someone else and you copied some important or confidential files from your office and moved it to your PC or notebook and going to return it to your friend or to the one who gave the pendriver to you. He can easily recover that file and can steal your information to avoid these things you have to destroy that file immediately after you copied to your pc or notebook.

But how to destroy confidential file?

There come the answer Shred. shred – deletes the content of the file securely by overwriting invalid data on its original contents.


# shred confidential.doc

Once you shred that file test it with the following command

# file confidential.doc

It will return that confidential.doc is a data or binary file. This command alters the file content with junk letters. To view the file content in terminal you can use the following command:

# cat confidential.doc

The man page of shred command will help you if you need more on shred.

Permanent link to this article:

Leave a Reply

Your email address will not be published.