Solved

root mail file filling fast (solaris 2.x)

Posted on 1998-06-09
1
226 Views
Last Modified: 2013-12-27
the local root mail file fills rapidly with informational messages from scripts and monitoring products. I need to automatically ( Once every 24hrs. ) go thru the file and delete emails that are more than 24hrs. old. I do need to keep emails within 24hr. period. ?
0
Comment
Question by:928
1 Comment
 
LVL 51

Accepted Solution

by:
ahoffmann earned 50 total points
ID: 2007768
add following in roots crontab:

59 23 * * * mv /var/spool/mail/root{,`.date +%d%m%y`}
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
linux  centos   virtualization network quetion 6 83
How to Change Interface on Cisco IOU 11 119
SQUD PROXY SERVER, UNIX, SLL/HTTPS 5 113
How to Insert a File Using Text Editor 9 100
Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question