Count the deleted files Shell script -
can tell me how can count files extension ".txt" delete folder? shell script in unix
thank reply :)
i tried delete them way :
deleted=0
while read line do
if test -d "$line" in "$line"/* if test -f "$i" deleted=`ls -l $line |grep "*.o" | wc -l` echo "from: " $line " deleted : " $deleted find . -type f -name "*.o" -exec rm -f {} \; else echo "not file " $i fi done else echo "not directory!" fi
done
try doing :
lang=c rm -v *.txt | grep -c "^removed "
shell
No comments:
Post a Comment