How 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

AuthorAdmin

My name is Devendra Dode. I am a full-stack developer, entrepreneur, and owner of Tutsmake.com. I like writing tutorials and tips that can help other developers. I share tutorials of PHP, Python, Javascript, JQuery, Laravel, Livewire, Codeigniter, Node JS, Express JS, Vue JS, Angular JS, React Js, MySQL, MongoDB, REST APIs, Windows, Xampp, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL and Bootstrap from a starting stage. As well as demo example.

Leave a Reply

Your email address will not be published. Required fields are marked *