![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Open .zip file created in UNIX | sam99 | UNIX for Dummies Questions & Answers | 5 | 07-04-2008 07:58 AM |
| When a file is created where does unix store the info? | goodmis | UNIX for Advanced & Expert Users | 5 | 02-04-2007 01:16 AM |
| File management based on date created | Geehog_Rare | UNIX for Dummies Questions & Answers | 1 | 01-30-2006 04:38 AM |
| Determine date and time the file was created through shell scripts | BharatSurana | Shell Programming and Scripting | 1 | 01-11-2006 01:06 PM |
| I want to get the file which created the error when the find command was run | guhas | Shell Programming and Scripting | 1 | 10-21-2005 03:06 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
|
|
||||
|
UNIX does not have a created date. What you want is the last time the file was modified - that date. Using 180 days for six months (you can adjust the number)
Code:
find /path/to/directory -mtime +180 Code:
find /path/to/directory -mtime +180 -exec ls -l {} \;
|
|
|||||
|
You can remove file in a similar way mcnamara suggested.
find /path/to/directory -mtime +180 -exec rm {} \; remember here it is necessary to give semicolon and has to be preceded by \ to take away its special meaning.here {} indicate that searched files would become arguments for rm. |
|
||||
|
Quote:
find . -ctime +180 |
![]() |
| Bookmarks |
| Tags |
| mtime |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|