File: find-filter.1

package info (click to toggle)
pcp 6.3.8-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 235,180 kB
  • sloc: ansic: 1,253,622; sh: 173,998; xml: 160,490; cpp: 83,331; python: 20,482; perl: 18,302; yacc: 6,886; makefile: 2,955; lex: 2,862; fortran: 60; java: 52
file content (89 lines) | stat: -rw-r--r-- 2,303 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
'\"macro stdmacro
.TH FIND-FILTER 1 "PCP" "Performance Co-Pilot"
.SH NAME
\f3find-filter\f1 \- fine-grained file selection based on time attributes
.SH SYNOPSIS
\f3$PCP_BINADM_DIR/find-filter\f1
[\f3\-v?\f1]
\f2predicate\f1
.SH DESCRIPTION
.B find-filter
is a filter for a list
of file names read on standard input, and if the files match the
.I predicate
their names are written on standard output.
.PP
The supported
.I predicate
forms are based on the file's creation
time or modification time, and take the form
.B ctime
or
.B mtime
followed by a time specification.
A time specification takes the form of a \f3+\f1 or
\f3-\f1 followed by days (a non-negative integer),
optionally followed by a colon (\f3:\f1) and hours
(an integer in the range 0 to 23),
optionally followed by another colon (\f3:\f1)
and minutes (an integer in the range 0 to 59).
.PP
The semantics of the time specification are that a file matches
the predicate if the
chosen time attribute for the file is
.I "less than"
(\f3+\f1) the current time
minus the time specification, else
.I "more than or equal to"
(\f3-\f1) the current time
minus the time specification.
Alternatively, \f3+\f1 means
.I before
the current time minus the
time specification, and
\f3-\f1 means
.I at
or
.I after
the current time minus the
time specification.
.PP
.B find-filter
is intended to be used to provide finer-grain and platform independent
selection compared to the
.B \-mtime
or
.B \-ctime
options of
.BR find (1).
.B find-filter
is expected to be used as a post-filter for the output from
.BR find (1),
and this is how it is used in the
.BR pmlogger_daily (1)
scripts to select files to be compressed or culled.
.SH EXAMPLES
The following
.I predicate
examples illustrate some typical uses.
.IP "\fBmtime +3" 12n
Matches files modified more than 3 days ago.
.IP "\fBctime -0:2" 12n
Matches files created in the last 2 hours.
.IP "\fBctime +0:0:15" 12n
Matches files created more than 15 minutes ago.
.SH DIAGNOSTICS
There are none, unless the
.B \-v
option is used, in which case some diagnostics are written to standard
error.
.PP
Exit status is always zero, unless there are errors found
when parsing the command line arguments.
.SH SEE ALSO
.BR find (1)
and
.BR pmlogger_daily (1).

.\" control lines for scripts/man-spell
.\" +ok+ mtime