The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script for automatic deletion of old files vivek_scv Shell Programming and Scripting 4 09-09-2007 02:57 AM
Automatic download of csv file using a shell script figaro Shell Programming and Scripting 1 01-13-2007 08:53 PM
Startup script to clean out trash can Andrek OS X (Apple) 4 10-19-2006 04:34 PM
Mail Command for deletion garric Shell Programming and Scripting 0 04-24-2006 06:49 AM
File deletion when server restarts k_oops9 Shell Programming and Scripting 6 11-22-2004 10:07 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-20-2007
crown2100bd crown2100bd is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 1
Script for automatic deletion of trash file of mail server

Hi,
I have a mail server with limited space and operating system is sun solaris 8 (sparc). I do not have provisions to increase the space for home directory.

So i have to delete files from /home/username/mail/trash which are more than 10 days old automatically.

So my script should be like it finds all the user name of mail server from /var/mail directory and then delete their trash from /home/username/mail/trash.

Can someone help me to generate a script for this?

With Regards,

Crown
  #2 (permalink)  
Old 09-20-2007
SanjayLinux SanjayLinux is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 58
Wink Try this one

find /home/username/mail/trash -type f -atime +10 -exec rm -f '{}' \;


~~~Sanjay Tripathi~~~
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:50 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0