Finding files older than a certain time on Linux
To find files than are older than a certain time in any Linux or UNIX system, you can use the find command with either the -mmin or -mtime argument. The -mmin argument lets you specify the time in minutes, while -mmtime specifies the time in days. After the argument, you give it the time, and you usually have to preceed this with a + sign (though some systems may not require this).
Some examples will make this clearer.
To get all files in the current directory that are older than 2 days:
To get all files in the current directory that are older than 1 hour:
Some examples will make this clearer.
To get all files in the current directory that are older than 2 days:
find * -mtime +2
To get all files in the current directory that are older than 1 hour:
find * -mmin +60
| Rating: | no ratings, 0 total Votes |
| Categories: | Linux find UNIX |
| Added: | on Jul 27, 2009 at 1:47 pm |
| Added By: | an anonymous user |
| Searches: | linux find time unix file |

