An open API service indexing awesome lists of open source software.

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

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
----