0

I need to display on screen all the files that hang recursively from the root and that have not been modified in the last two days, with a size smaller than 5 KB.

I can show the files that hang recursively from the root with ls -R but it also show me directories, i dont know if is there any way to show only the files with the filters that i write.

I appreciate any help.

muru
  • 72,889

1 Answers1

1

You should able to do that with find and something like:

find / -mtime +1 -type f
  1. find starting from root: /
  2. select anything that has not been modified in the last two days (48 hours): -mtime +1
  3. only select files: -type f

Be careful with units on mtime

As mentioned in comments and explained here, be aware of what the units on -mtime +1 means and then match that to your expectations.