![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Find 3 months old log files and remove | cvdev | SUN Solaris | 13 | 05-22-2008 10:38 AM |
| Deleting the files comparing the creation dates | pssandeep | UNIX for Dummies Questions & Answers | 2 | 04-10-2008 07:54 AM |
| Files and dates | mastachef | UNIX for Dummies Questions & Answers | 1 | 12-03-2007 11:12 AM |
| Last modification times of files less than 6 months old | Abhishek Ghose | UNIX for Dummies Questions & Answers | 1 | 10-19-2005 04:37 AM |
| Listing files older than 2 months | pbekal | Shell Programming and Scripting | 3 | 01-17-2002 11:12 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
deleting files with dates 3 months ago
please help me with this?????
i need to create a program that will run in unix that will delete all files in a given directory that is at least 3 months old. first the program will need to automatically know what date it is right now to determine the files it will delete...guys help me please |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Use the forum's search feature.
command unix to list all files created since n month ago Listing files older than 2 months |
|
#3
|
||||
|
||||
|
try this:
Code:
find the_directory -type f -ctime +90 -exec rm -f {} \;
|
|
#4
|
|||
|
|||
|
hey guys thanks a lot;
Just thinking if i can use the same code with the same result using korn shell, will this program work as well: #!/bin/ksh find /export/home/zzgodae/archive -type f -ctime +90 -exec rm -f {} \; thanks again Last edited by godalle; 11-08-2005 at 01:27 AM. |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | |
| Display Modes | |
|
|