The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Removing files older than 7 days texasoeb UNIX for Dummies Questions & Answers 3 04-20-2007 05:04 PM
ls latest 4 days or specify days of files in the directory happyv Shell Programming and Scripting 3 01-22-2007 07:16 AM
Searching for files over 30 days old in current directory cxredd4 Shell Programming and Scripting 18 06-11-2006 03:16 AM
How to zip a modified file 15 days before but not scanning my sub directory files skrish70 Shell Programming and Scripting 1 10-10-2005 04:41 PM
removing files that are 60 days old aojmoj Shell Programming and Scripting 5 01-26-2004 02:45 PM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-23-2005
justinb_155 justinb_155 is offline
Registered User
  
 

Join Date: Jun 2005
Location: Oklahoma
Posts: 2
Removing files automatically from a directory after 30 days.

Hello;

I have a directory that is collecting log and act files. I need to write a script that will remove these files once they are 30 days old. I have read through a number of threads on this site that have given me a great deal of information. However I have what seems to be a unique situation. I can't use the -atime or the -mtime commands because not all the files that haven't been modified or accessed can be deleted. There are non log or act files in this directory. One thing that may help is that the log and act files use yyyymmdd.log or yyyymmdd.act file naming system. IE 20050623.log or 20050623.act. How can I use this to generate my script? Thank you very much in advance for your knowledge and help.
 

Bookmarks

Tags
mtime

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 07:29 PM.


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