# what is shred exactly and is it ethical

Hi all,

I am on a learning curve in rhcsa on which we had a tutorial on how to use man and info pages. After this tutorial we in the class tried to search man pages on some commands.

One command we found interesting while tabbling is the shred command. We peeked through the man pages of shred and where surprised with the information given which is below copied and pasted from the man pages

SHRED(1) User Commands SHRED(1)

"NAME shred - overwrite a file to hide its contents, and optionally delete it

SYNOPSIS shred [OPTION]... FILE...

DESCRIPTION Overwrite the specified FILE(s) repeatedly, in order to make it harder for even very expensive hard‐ ware probing to recover the data."

What i understood as a beginner is that we can erase the files completely from the harddisk without keeping any traces of it.

If the above is correct is it ethical.

If not any explaination on shred in depth please.

Regards

Amod

edit retag close merge delete

Sort by » oldest newest most voted

Why not? You have a personal file and don't want anybody to be able to access its content ever. Specially if it is on a mobile device, it might be recovered even if you delete it normally. In such cases, you can use shred or similar commands to destroy the file's contents (almost) completely.

It can be unethical if you remove others' files! But this is the same as using rm to delete others' files (even in that case recovering the files could become very hard soon).

A little explanation: when you delete a file normally, it is only deleted from the file system (e.g. ext4). In some file systems, it is only "marked" as deleted. They usually don't touch the contents, but the area might be overwritten by new files later (because the area is not occupied in file system's view). Therefore, it might be possible to 'recover' a deleted file's contents after removal. By using tools like shred, the file's content is first overwritten with a predefined pattern or a random pattern repeatedly (3 times usually because of some properties of HDDs), so that the contents are destroyed. Then, you might remove the file from file system. Even if recovered, it'll not contain original contents.

more

1

@amod I have no idea how ethics come into this. Shred ensures that your file cannot be recovered, even using recovery tools. You seem to have misunderstood it.

( 2013-06-13 06:57:01 -0500 )edit

If encryption is the practice of obscuring the contents of a file so only authorized people can read it, shred could be considered one of the encryption world's delete utilitys - makes sure that a deleted file stays deleted. As for the ethics, it's no more ethical or unethical than encryption - making sure your private information stays private.

( 2013-06-14 08:11:06 -0500 )edit