Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#!/bin/bash####################################### Clean out nasty files from a directory tree# This will retain the filename - but create a zero length file# Th file exists as a place holder#if [ -z "$1" ] ; thenecho Must provide a directory nameexit 1fiif [ ! -d "$1" ] ; thenecho Path is not a directoryecho Path: $1exit 1fiBAD="*.DMP *.dmp *.so *.gz *.zip *.lib *.dll *.bz *.bz2 *.tbz *.jar *.deb *.exe *.a *.msb"for name in $BAD ; dofind "$1" -xdev -type f ! -size 0 -name "$name" |while read filenamedoecho Zero - "$filename"cat /dev/null > "$filename"donedone