* NOTE *In the case of ext3/ext4 file systems, in both the data=ordered (default) and data=writeback modes, shred works as usual.Ext3/Ext4 journaling modes can be changed by adding the data=something option to the mount options for a particular file system in the /etc/fstab file.
Most Linux distribution come with shred already installed. If not, they are one click away in the repositories. shred is already included, in the multipurpose package called coreutils, which includes tens of utilities.
shred is a command utility. It can be run against files or folders, with certain flags.
# shred -f -u -v -z filename-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
shred might not work on bad sectors, it is one of the best tools available to securely erase data from your hard disk. It is always more secure to run shred on a complete partition rather than a file, because some filesystems keep backup files and shred makes no attempt to delete these.
# shred /dev/hda2