Dave's Brain

Browse - computer tips - linux find files that have not been modified for a week or more

Date: 2010may4
OS: Linux

Q.  How do I find all files that have not been modified for a week or more?

A.

	find . -type f -mtime +7 -ls

             ^       ^         ^  ^
             |       |         |  |
             |       |         |  Display full info about the file
             |       |         |  
             |       |         Modified date was 7 days ago or more
             |       |         
             |       Only files (not folders, symlinks, sockets, etc)
             |       
	     Starting in the current directory
What this info useful to you? You can donate to say thanks

Add a comment

Sign in to add a comment
Copyright © 2008-2012, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.
Advertisements: