Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Find (Unix)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Searching files by time === Date ranges can be used to, for example, list files changed since a backup. * {{code|-mtime}} : modification time * {{code|-ctime}} : inode change time * {{code|-atime}} : access time Files modified a relative number of days ago: * +[number] = At least this many days ago. * -[number] = Less than so many days ago. * [number] = Exactly this many days ago. * Optionally add <code>-daystart</code> to measure time from the beginning of a day (0 o'clock) rather than the last 24 hours. Example to find all text files in the document folder modified since a week (meaning 7 days): <syntaxhighlight lang="console"> $ find ~/Documents/ -iname "*.txt" -mtime -7 </syntaxhighlight> Files modified before or after an absolute date and time: * <code> -newermt YYYY-MM-DD</code>: Last modified after date * <code>-not -newermt YYYY-MM-DD</code>: Last modified before date Example to find all text files last edited in February 2017: <syntaxhighlight lang="console"> $ find ~/Documents/ -iname "*.txt" -newermt 2017-02-01 -not -newermt 2017-03-01 </syntaxhighlight> *<code>-newer [file]</code>: More recently modified than specified file. ** <code>-cnewer</code>: Same with inode change time. ** <code>-anewer</code>: Same with access time. ** Also prependable with <code>-not</code> for inverse results or range. List all text files edited more recently than "document.txt": <syntaxhighlight lang="console"> $ find ~/Documents/ -iname "*.txt" -newer document.txt </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)