hi everyone.
im clearing my users mailbox with this script
however it seems that hangsup due of the large size of my users inbox (Argument list too long)
How can I insert this in the script?:
im clearing my users mailbox with this script
Code:
#!/bin/sh
#Deletes emails older than this number of days
OLD_THAN_DAYS=30
for i in `ls /usr/local/directadmin/data/users`; do
{
if [ ! -d /home/$i/Maildir ]; then
continue;
fi
for file in `find /home/$i/Maildir -mtime +${OLD_THAN_DAYS} | grep -E '/cur/|/new/'`; do
{
rm -fv $file;
};
done;
};
done;
exit 0;
however it seems that hangsup due of the large size of my users inbox (Argument list too long)
How can I insert this in the script?:
Code:
find . -type f -delete