Linux.com

CLI Magic: For geek cred, try these one-liners

Posted by: Anonymous [ip: 172.17.100.87] on July 24, 2008 01:44 AM
Wonderful article and great comments! I'm bookmarking this one!

If you ever find the need to erase sensitive data from a linux system try this:

$ find -type f -execdir shred -fuzv -n7 '{}' \; rm -rf *

Now note that you can leave off the end and erase the empty directories manually. Not trying to get anyone to erase their files!

There is also debate on whether the shred command is even useful on journalizing filesystems since the metadata is still left behind. I'm not going to argue this point since I usually use this when I am erasing old floppies I have lying around (yes, I still use them sometimes).

#

Return to CLI Magic: For geek cred, try these one-liners