#!/bin/sh
ls -l |while read line
do
month=`echo $line|awk '{print $6}'`
day=`echo $line|awk '{print $7}'`
#time=echo $line|awk '{print $8}'`
file=`echo $line|awk '{print $9}'`
if [ "$month" = "Jan" -a "$day" = "1" ]
then
continue
else
rm $file
echo "rm $file Ok!"
fi
done
source: http://www.unixsky.org/docs/linux/
This entry was posted
on Saturday, March 27th, 2004 at 10:18 pm and is filed under Linux.
You can follow any responses to this entry through the RSS 2.0 feed.
Both comments and pings are currently closed.