Windows dir /od (sort by date) equivalent in Linux
Locates files modified within a specific time window.
dir /od (sort by date)
find . -mtime -1
find . -mtime -1
find . -mtime -1
Overview
What this command does
On Windows, "dir /od (sort by date)" is used to find recently modified files. On Linux, the closest practical mapping shown here is "find . -mtime -1". Locates files modified within a specific time window. This reference is grouped under Text Processing → Search.
Windows → Linux context
What changes when you use this on Linux?
Equivalent task, different tool
Windows dir /od (sort by date) maps to find . -mtime -1 for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.
Portable across the compared distros
The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.
For the broader concept behind this mapping, read Linux command-line basics.
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
Debian/Ubuntu, Fedora and Arch all use "find . -mtime -1" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.
| 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