https://github.com/saj/ffind-mtime
Fast find by modification time
https://github.com/saj/ffind-mtime
unix
Last synced: 10 months ago
JSON representation
Fast find by modification time
- Host: GitHub
- URL: https://github.com/saj/ffind-mtime
- Owner: saj
- License: mit
- Created: 2019-06-27T13:44:10.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-27T13:44:36.000Z (almost 7 years ago)
- Last Synced: 2025-05-14T11:26:53.663Z (about 1 year ago)
- Topics: unix
- Language: Go
- Size: 1.95 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.asciidoc
Awesome Lists containing this project
README
= ffind-mtime
Fast find by modification time. This is a simple cruft detector for your filesystem.
----
ffind-mtime
----
Exit with status 0 if all files beneath `` are at least `` or older. File age is derived from i-node `mtime` and the system clock. Exit with status 10 if any file is found to be younger than ``. The first young file will terminate the search: this is the _fast_ in _fast find_.
`` may be a directory or non-directory. `` is an integral number of seconds; the number may optionally be followed by an `s`, `m`, `h`, `d`, `w`, or `y` to specify a multiple seconds, minutes, hours, days, weeks, or years.
No output is written if the search terminates without encountering an I/O error.
== Examples
Find disused caches:
----
find ~/Library/Caches -mindepth 1 -maxdepth 1 -type d -print0 \
| while read -r -d '' p; do ffind-mtime "$p" 90d && echo "$p"; done
----