0

I have a python method to archive files not modified in 6 months to another drive by iterating through the directories. But what is the fastest way to find all non-modified files from the whole partition?

Found this below answer to find modified files and I suppose it is in the current path. But what If the root path is given and want to list all unmodified files.

I would like to modify the question a bit based on an observation I found in the answer I have posted below- (from the link). The find directory -mtime +180 function returns directories as well. So how do I list only files which are not modified in last 6 months and not directories?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
sjd
  • 135

1 Answers1

0

I think i got the answer here. I should have searched it little farther . Posting the answer as is.

find directory -mtime +150 for the files not modified in this period (-150 will list the modified files).

Adding comment above for filtering only files

find directory -mtime +150 -type f

sjd
  • 135