shred -u <archivo>
#!/usr/bin/env bashnames="rm_temp" # File name prefixblock_size=1048576000 # Size of individual files (1G)r=0i=0while [ $r -eq 0 ];do head -c $block_size /dev/urandom > $names""$i r=$? i=$(($i + 1))donerm -f $names*
names="rm_temp"
srm -hsrm v3.1 (c) 1997-2003 by van Hauser / THC <[email protected]>Syntax: srm [-dflrvz] file1 file2 etc.Options: -d ignore the two dot special files "." and "..". -f fast (and insecure mode): no /dev/urandom, no synchronize mode. -l lessens the security (use twice for total insecure mode). -r recursive mode, deletes all subdirectories. -v is verbose mode. -z last wipe writes zeros instead of random data.srm does a secure overwrite/rename/delete of the target file(s).Default is secure mode (38 writes).You can find updates at http://www.thc.org
DESCRIPTION srm is designed to delete data on mediums in a secure manner which can not be recovered by thiefs, law enforcement or other threats. The wipe algorythm is based on the paper "Secure Deletion of Data from Magnetic and Solid-State Memory" presented at the 6th Usenix Security Symposium by Peter Gutmann, one of the leading civilian cryptographers. The secure data deletion process of srm goes like this: * 1 pass with 0xff * 5 random passes. /dev/urandom is used for a secure RNG if avail‐ able. * 27 passes with special values defined by Peter Gutmann. * 5 random passes. /dev/urandom is used for a secure RNG if avail‐ able. * Rename the file to a random value * Truncate the file As an additional measure of security, the file is opened in O_SYNC mode and after each pass an fsync() call is done. srm writes 32k blocks for the purpose of speed, filling buffers of disk caches to force them to flush and overwriting old data which belonged to the file.