Find UNIX files modified within a number of days

Contributor Icon Contributed by qmchenry  
Tag Icon Tagged: UNIX  


To find all files modified within the last 5 days:

find / -mtime -5 -print

The – in front of the 5 modifies the meaning of the time as “less than five days.” The command

find / -mtime +5 -print

displays files modified more than five days ago. Without the + or -, the command would find files with a modification time of five days ago, not less or more.

 

5 Comments -


No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment -