Computing.Net > Forums > Unix > removing files / match criteria

removing files / match criteria

Reply to Message Icon

Original Message
Name: H3001
Date: June 24, 2007 at 04:18:38 Pacific
Subject: removing files / match criteria
OS: AIX5.2
CPU/Ram: PowerPC/1024
Model/Manufacturer: IBM-44p
Comment:

Hi all,
I'm spendind hours trying to figure out how a script could remove files that are older than 30 days, matching some criteria in their names, in a specific volume and within different user folders. I'm thinking if calling all the user folders with a name starting with "RC-user..", so the removal script could skip the files and folders staring with this naming convention.
Any help is more than welcome !
Cheers,
H.


Report Offensive Message For Removal


Response Number 1
Name: nails
Date: June 25, 2007 at 10:43:55 Pacific
Subject: removing files / match criteria
Reply: (edit)

Have you considered the find command? It has an -mtime option for finding files greater than "X" number of days.

Check out this miscellaneous find article:

http://www.unixreview.com/documents...

It describes how to ignore directories with find.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: removing files / match criteria

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 3 Days.
Discuss in The Lounge