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

AuthorDevendra Dode

Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of Tutsmake.com. My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including 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. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

Leave a Reply

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