Voder-Vocoder

The Log of Hal Canary

Navigation: Home | THE LOG | Log Archives | Resume | Contact Info | Public Key | SSL | Math Applets | Site Map | RSS2 | Atom | Backend

« | »

Recursive Shred And Remove

#!/bin/sh
##  RECURSIVE SHRED AND REMOVE
##  (c) Hal Canary 2005
##  big_geek at halcanary dot org
##  Version:  rm-shred v2005-07-02.
##  This is free software; you can redistribute
##  it and modify it under the terms of version
##  2 of the GNU GPL.
for x in "$@" ; do
  if [ -d "$x" ] ; then
    if [ "$x" != "." -a "$x" != ".." ] ; then
      touch "${x}"/EMPTY
      rm-shred "${x}"/*
      rmdir "${x}"
    fi
  else
    shred -n 1 -u "$x"
  fi
done

Hal Canary | Computers & Code | 2005-11-11 15:30:34 UTC
Permanent Link Comments Off | No Comments

Comments are closed.
Email me your comments — h3 at halcanary dot org.

Copyright 1997-2011 by Hal Canary.
mailto: h3 at halcanary dot org
http://halcanary.org