• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / How to Find Files That Have Been Modified in Last 24 Hours

How to Find Files That Have Been Modified in Last 24 Hours

By Sourabh / June 3, 2024 Category: How To, Ubuntu

Ubuntu users can use find command with -mtime option to find files that have been modified in last 24 hours. The find command is used to locate files and directories based on various criteria.

Using find Command

The ‘find’ command searches the directory tree rooted at each file name FILE by evaluating the EXPRESSION provided. This list of files to search is followed by a list of expressions
describing the files we wish to search for.

find [path] -type f -mmin n

NOTE: The n indicates the time in minutes – how many minutes you want to find files for. The following command options are used:

  • -n will find the files which have been modified in less than n minutes (- is for more/decreasing order)
  • +n will find the files which have been modified in more than n minutes (+ is for more/increasing order)
  • n will find the files which have been modified in exacly specific n minutes

Using Find Command

Find for all the files in the “Downloads” directory that have been modified/altered exactly 24 hours ago:

$ find ~/Downloads -type f -mtime 0

Search the entire system for files which have been modified/altered exactly 24 hours ago:

$ find / -type f -mtime 0

Search for files within the current directory and its subdirectories. It will show the files that have been modified/altered exactly 24 hours ago:

$ find . -type f -mtime -0

Finding files modified in the last 10 minutes

The following fin command will find all the files that have been modified in the last ten minutes. Note that unless path is specified, it will find files in the current directory.

$ find . -type f -mmin -10

Finding files modified in the last n days

You can use -mtime instead of -mmin to find modified files in the last n days instead of n minutes.

For example, to find files that have been modified in the last 3 day in Downloads folder, the following command will be used:

find /Downloads -type f -mtime -3 -ls

Similarly, if you want to find modified directories in the last n minutes or days, just change -type f with -type d. The d is for directories whereas the f is for files.

  1. Using find Command with -mmin Option

How to Find Files That Have Been Modified in Last 24 Hours

For example to find the files modified in less than 24 hours, we shall use 1440 minutes (24 hours into minutes 24 hours * 60 minutes). See the command given below:

$ find ~/Downloads -type f -mmin -1440

The another way to find files modified within the specific date is by using the find command with -newermt Option

The -newermt option is used to find files based on an exact date and time rather than a relative time period.

The following command can be used to find files modified 24 hours ago:

$ find ~/Downloads -type f -newermt "24 hours ago"

Primary Sidebar

Latest Posts

How To Fix Broken Packages On Ubuntu From Terminal

Re Execute The Previous Command In Linux Ubuntu Command Line

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

Linux Command To Check RAM Size In Ubuntu Terminal In GB

How To Install Proprietary Drivers In Linux Ubuntu Using Terminal

How To Shutdown Linux With A 15 Minute Delay And Message

Free AI Courses With Certificate For Beginners In India

Best AI Plugins For WordPress To Use In 2026

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap