Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding files/directories not updated within # of days

Status
Not open for further replies.

josel

Programmer
Oct 16, 2001
716
US
I know how to find files updated within # of days but how can I find files not updated in # of days?

find [path] -type f -mtime -$1 -print
find [path] -type d -mtime -$1 -print

One way I can think of is to create list of updated files and match that list against the full list of files ... :) but this is not exactly what I am looking for.

All help will be appreciated!

Thank you in advance;

josel If you have the knowledge, consult and educate those who need it! - Jose Lerebours
 
It may not be the norm to answer your own questions, but I figure I post the answer:

find /appl/filepro -type f ! -mtime -$1 -print

Using ! (the NOT operator) is the key (found answer in my book "UNIX POWER TOOLS" page 295).


josel
If you have the knowledge, consult and educate those who need it! - Jose Lerebours
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top