Search the web
Sign In
New User? Sign Up
smalllinux · A discussion list dedicated to Small Linux and other small operating systems and embedded systems
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Facing problem in shell script   Message List  
Reply | Forward Message #729 of 732 |
Respected Sir/Madam,

I want to write shell script to delete files based on file creation datetime. If a file or folder is 30 minutes old then it should delete.

It shouldn't delete viewedit folder.

Example
I have a folder /temp/temp_files under this we have viewedit folder [/temp/temp_files/viewedit] and also so many different folders and file will be there. [Folder and files will be generated by application]
Now except viewedit folder I need to delete all file and folder form /temp/temp_files this location if it is 30 minutes old.

By using find command I am facing lot of problem
i have used like this
find /temp/temp_files/* ! \( -name viewedit -prune \) -a \( -mmin +30 \) -exec rm -rf {}  \;

Please can any one help me in this..it will be great helpful for me.

I will wait for the response

Thanks and regards,
vadiraj


Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.

Mon Oct 16, 2006 11:32 pm

vadi_ksdba
Offline Offline
Send Email Send Email

Forward
Message #729 of 732 |
Expand Messages Author Sort by Date

Respected Sir/Madam, I want to write shell script to delete files based on file creation datetime. If a file or folder is 30 minutes old then it should delete....
vadi raj
vadi_ksdba
Offline Send Email
Oct 17, 2006
5:35 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help