FIND-FILTER(1)

πŸ“¦
version 7.2.2 Β· 2 versions
, in arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– FIND-FILTER(1) πŸ’–

okay bestie, welcome to the fine-grained file selection page β€” this is find-filter from the Performance Co-Pilot manual, and honestly? it's giving "tiny tool, huge main character energy" πŸŽ€


✨ NAME ✨

find-filter β€” fine-grained file selection based on time attributes 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

$PCP_BINADM_DIR/find-filter [-v?] predicate

πŸ’… DESCRIPTION πŸ’…

so like. find-filter is a filter for a list of file names read on standard input, and if the files match the predicate, their names get written on standard output. that's it, that's the vibe πŸ’–

The supported predicate forms are based on the file's creation time or modification time, and take the form ctime or mtime followed by a time specification. A time specification takes the form of a + or - followed by days (a non-negative integer), optionally followed by a colon (:) and hours (an integer in the range 0 to 23), optionally followed by another colon (:) and minutes (an integer in the range 0 to 59). πŸ•°οΈ

The semantics of the time specification are that a file matches the predicate if the chosen time attribute for the file is less than (+) the current time minus the time specification, else more than or equal to (-) the current time minus the time specification. Alternatively, + means before the current time minus the time specification, and - means at or after the current time minus the time specification. no cap, that's literally the whole logic 🧠✨

find-filter is intended to be used to provide finer-grain and platform independent selection compared to the -mtime or -ctime options of find(1). find-filter is expected to be used as a post-filter for the output from find(1), and this is how it is used in the pmlogger_daily(1) scripts to select files to be compressed or culled. iconic behaviour honestly πŸ‘‘


🌈 EXAMPLES 🌈

The following predicate examples illustrate some typical uses. πŸ“

  • mtime +3 β€” Matches files modified more than 3 days ago.
  • ctime -0:2 β€” Matches files created in the last 2 hours.
  • ctime +0:0:15 β€” Matches files created more than 15 minutes ago.

πŸ’€ DIAGNOSTICS πŸ’€

There are none, unless the -v option is used, in which case some diagnostics are written to standard error. πŸ™ˆ

Exit status is always zero, unless there are errors found when parsing the command line arguments. periodt. πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

find(1) and pmlogger_daily(1). go read those too bestie, iykyk πŸ“šβœ¨


ok that's the whole page, you ate that 🫢 go filter some files and slay πŸ’–

mwah πŸ’‹ β€” this was the FIND-FILTER(1) page from Performance Co-Pilot (PCP), General Commands Manual, and that's the tea πŸŽ€

πŸ“¦ where this page comes from