#!/bin/sh #ident "@(#) 1.0 remove zero length and unwanted files 20070909 John S. Urban" ################################################################################ export TTY TTY=`tty` ls -d ${*:-*}|(while read paths do ################################### if test -L "$paths" then : # ignore links ################################### elif test -d "$paths" then : # directory ################################### elif test ! -s "$paths" then #echo file "$paths" has no length file "$paths" ls -ltras "$paths" rm -v -i "$paths" < $TTY ################################### fi ################################### done) ################################################################################ for NAME in *~ *.stackdump .*.swp do rm -v -f "$NAME" done ################################################################################ exit ################################################################################