Wednesday, December 25, 2024
Google search engine
HomeGuest BlogsHow to Find Last Modified Files in Linux

How to Find Last Modified Files in Linux

Find last modified files in linux; Through this tutorial, we will learn how to find modified files in last 1, 2, 5, 30 … N days and 1, 2, 5, 30 … N minutes in Linux.

How to Find Last Modified Files in Linux

Use the following commands to find modified files in last 1, 2, 5, 30 … N days and 1, 2, 5, 30 … N minutes in Linux:

  • Find files modified in last 2 days Linux
  • Find files modified in last 5 days Linux
  • Find files modified in last 30 days Linux
  • Find files modified in last 5 minutes Linux
  • Find files modified in last 30 minutes Linux

Find files modified in last 2 days Linux

Use the following command to find files modified in last 2 days in linux:

find /directory/path/ -mtime -2 -ls

Find files modified in last 5 days Linux

Use the following command to find files modified in last 5 days in linux:

find /directory/path/ -mtime -5 -ls

Find files modified in last 30 days Linux

Use the following command to find files modified in last 30 days in linux:

find /directory/path/ -mtime -30 -ls

Find files modified in last 5 minutes Linux

Use the following command to find files modified in last 5 minutes in linux:

find myapp/ -type f -mmin -5

Find files modified in last 30 minutes Linux

Use the following command to find files modified in last 30 minutes in linux:

find myapp/ -type f -mmin -30

Conclusion

Through this tutorial, we have learned how to find modified files in last 1, 2, 5, 30 … N days and 1, 2, 5, 30 … N minutes in Linux.

Recommended Linux Tutorials

RELATED ARTICLES

Most Popular

Recent Comments