Windows
Linux
Text Processing
Search
Windows dir /od (sort by date) equivalent in Linux
Locates files modified within a specific time window.
Windows
→
dir /od (sort by date)
Linux equivalents
find . -mtime -1
find . -mtime -1
find . -mtime -1
Overview
What this command does
Locates files modified within a specific time window.
Migration tip:
-mtime -1 means modified within the last 24 hours. -mmin -60 means within the last 60 minutes. Positive numbers mean older than that many days.Practical tasks
Common use cases
Find recently modified files
Locates files modified within a specific time window.
find . -mtime -1
Modified in last 24 hours
find . -mtime -7
Modified in last 7 days
find . -mmin -60
Modified in last 60 minutes
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
find . -mtime -1 -type f
find /etc -mmin -30
ls -lt
Walkthrough
Examples with explanations
# Windows: dir /od
# Files changed in last 24 hours:
find . -mtime -1 -type f
# Changes in /etc in last 30 minutes:
find /etc -mmin -30
# List with newest first:
ls -lt
Reference
Common options and variations
| Command or option | Use |
|---|---|
find . -mtime -1 | Modified in last 24 hours |
find . -mtime -7 | Modified in last 7 days |
find . -mmin -60 | Modified in last 60 minutes |
find . -newer file.txt | Newer than a reference file |
ls -lt | List sorted by modification time (newest first) |
ls -ltr | Sorted by modification time (oldest first) |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
This command is the same on Debian/Ubuntu, Fedora and Arch Linux when the relevant tool is installed.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | find . -mtime -1 |
Same command on this distribution. |
| Fedora | same command | find . -mtime -1 |
Same command on this distribution. |
| Arch | same command | find . -mtime -1 |
Same command on this distribution. |
Keep learning