Sponsored Content
Operating Systems Solaris Script for automatic deletion of trash file of mail server Post 302136887 by SanjayLinux on Thursday 20th of September 2007 08:01:51 AM
Old 09-20-2007
Hammer & Screwdriver Try this one

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


~~~Sanjay Tripathi~~~
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File deletion when server restarts

Hi, In a shell script I am makin use of 3 files f1,f2 and f3.txt. When the Unix server is restarted I want to delete all these 3 files if they are existing. ( I suppose I will have to use this command rm /thefilepath/f* but dont know in which script to use.) Anyone knows what can be... (6 Replies)
Discussion started by: k_oops9
6 Replies

2. Shell Programming and Scripting

Mail Command for deletion

How do i delete a mail i have just read using the mail command in a shell script ??? Thanks .... (0 Replies)
Discussion started by: garric
0 Replies

3. Shell Programming and Scripting

Script for automatic deletion of old files

Hi, I have a folder with limited space. I do not have provisions to increase the space for this folder. So i have to delete files which are more than 1 month old automatically. But, i need to maintain the files created by 4 users and delete all the other files automatically which is more than 1... (4 Replies)
Discussion started by: vivek_scv
4 Replies

4. Solaris

Script for automatic deletion of old folder

Hi, I have a folder with limited space. So i have to delete folder which are more than 5 days old automatically. So my script should be like delete the folder more than 5 days old. Can someone help me to generate a script for this. Thank you... Cheer Summer (5 Replies)
Discussion started by: summerpeh
5 Replies

5. Shell Programming and Scripting

Shell script for sending automatic email to personal mail id

hi guys, I need a shell script to send mail automatically to my personal mail id like xxxx@hotmail.com but while experimenting with "mail" command I faced following problems. cat text1.txt | mail -s 'test mail' xxxx@hotmail.com command successfully executed but while checking for... (4 Replies)
Discussion started by: rrd1986
4 Replies

6. Windows & DOS: Issues & Discussions

Configure automatic script in windows server

Dear Experts, I have database running,on windows server 2003 and my database are going down frequently due to some oracle bug. I need help to configure the automatic script which run's and check the database status, if database is down then send me email. Thanks in Advance. (32 Replies)
Discussion started by: Mohammed Fareed
32 Replies

7. Ubuntu

Automatic update script issue (Ubuntu server)

Hi, I've created a very basic script to run apt-get update and apt-get dist-upgrade unattended (run with cron) and save the logs. Though, it's not really a script, just a file containing the commands to run in order: pasteit .com/18601 I'm currently testing this and ran into some unexpected... (4 Replies)
Discussion started by: Raxje
4 Replies

8. Open Source

Shell script file movement to a Mail Box server using ftp commands

Hi All, I have a current Process that runs "windows script " for the file movement that needs to changed to a "DataStage Process (Using shell script )" Source :Text file is getting generated as part of Datastage Jobs processes and resides in a shared drive (Unix server) Target :ftp... (2 Replies)
Discussion started by: developer.dwh9
2 Replies

9. UNIX for Dummies Questions & Answers

Deletion of list of user based on a text file In LDAP UNIX server

Dear All, It would be really nice, if you could help me to write a script for deletion of list of user( more than 15000 users) stored in a file and sorted by email address( i need deletion of only a particular type of mail address). Is the any script to write and take the file as input and... (3 Replies)
Discussion started by: Chand
3 Replies
RESTORE-TRASH(1)					      General Commands Manual						  RESTORE-TRASH(1)

NAME
restore-trash - Restore for Command line trash utility. SYNOPSIS
restore-trash DESCRIPTION
Use for restore a trashed file or directory, in the original path. This command is a part of trash-cli package that provides a command line interface trashcan utility compliant with the FreeDesktop.org Trash Specification. It remembers the name, original path, deletion date, and permissions of each trashed file. EXAMPLES
$ restore-trash 0 2007-08-30 12:36:00 /home/andrea/foo 1 2007-08-30 12:39:41 /home/andrea/bar 2 2007-08-30 12:39:41 /home/andrea/bar2 3 2007-08-30 12:39:41 /home/andrea/foo2 4 2007-08-30 12:39:41 /home/andrea/foo What file to restore [0..4]: 4 $ ls foo foo BUGS
Report bugs to http://code.google.com/p/trash-cli/issues AUTHORS
Trash was written by Andrea Francia <andreafrancia@users.sourceforge.net> and Einar Orn Olason <eoo@hi.is>. This manual page was written by Steve Stalcup <vorian@ubuntu.com>. Changes made by Massimo Cavalleri <submax@tiscalinet.it>. SEE ALSO
trash-put(1), trash-list(1), trash-empty(1), and the FreeDesktop.org Trash Specification at http://www.ramendik.ru/docs/trashspec.html. Both are released under the GNU General Public License, version 2 or later. RESTORE-TRASH(1)
All times are GMT -4. The time now is 04:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy