GNU Find Examples

From Michael's Information Zone
Revision as of 11:16, 18 December 2019 by Michael.mast (talk | contribs) (→‎Relative paths)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Find files based on "creation" time

Normally I use ctime, but there was one directory that was constantly being changed. Ended up using mtime since the file contents never changed.

find /somedir/ -type f -mtime -90

Relative paths

[1]

find /somedir/ -type f -exec realpath --relative-to /somedir {} \;