|
-
May 20th, 2002, 03:29 AM
#1
Shell Script
find / -mtime +30 -print
i need to write a script(UNIX) to delete files created older than 30 days
i'm only a beginner and i only found the above function -mtime
i tried this :
for fn in `ls *.*`
do
if [find ${WKDIR}/${fn} -mtime +30]; then
rm ${fn}
fi
done
*but this doesnt work
can someone help?
thanks a lot..reply soon..urgent
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|