1210 purge_samples() {
1211 local dir="$1"
1212 local retention_time="$2"
1213
1214 # Delete collect files which more than --retention-time days old.
1215 find "$dir" -warn -type f -mtime +$retention_time -exec rm -f '{}' \;
1216
1217 local oprofile_dir="/var/lib/oprofile/samples"
1218 if [ -d "$oprofile_dir" ]; then
1219 # "pt_collect_" here needs to match $CMD_OPCONTROL --save=pt_colle
ct_$p
1220 # in collect(). TODO: fix this
1221 find "$oprofile_dir" -warn -depth -type d -name 'pt_collect_*' \
1222 -mtime +$retention_time -exec rm -rf '{}' \;
1223 fi
1224 }
Indeed, option is not supported on FreeBSD:
root@freebsd91:/usr/home/openxs # find /var/lib/pt-stalk -warn -type f -mtime +30 -exec rm -f '{}' ';'
find: -warn: unknown primary or operator
root@freebsd91:/usr/home/openxs # uname -a
FreeBSD freebsd91 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243826: Tue Dec 4 06:55:39 UTC 2012 <email address hidden>:/usr/obj/usr/src/sys/GENERIC i386
root@freebsd91:/usr/home/openxs #
I do see code like this (version 2.2.11):
1210 purge_samples() { dir="/var/ lib/oprofile/ samples"
1211 local dir="$1"
1212 local retention_time="$2"
1213
1214 # Delete collect files which more than --retention-time days old.
1215 find "$dir" -warn -type f -mtime +$retention_time -exec rm -f '{}' \;
1216
1217 local oprofile_
1218 if [ -d "$oprofile_dir" ]; then
1219 # "pt_collect_" here needs to match $CMD_OPCONTROL --save=pt_colle
ct_$p
1220 # in collect(). TODO: fix this
1221 find "$oprofile_dir" -warn -depth -type d -name 'pt_collect_*' \
1222 -mtime +$retention_time -exec rm -rf '{}' \;
1223 fi
1224 }
Indeed, option is not supported on FreeBSD:
root@freebsd91: /usr/home/ openxs # find /var/lib/pt-stalk -warn -type f -mtime +30 -exec rm -f '{}' ';' /usr/home/ openxs # uname -a :/usr/obj/ usr/src/ sys/GENERIC i386 /usr/home/ openxs #
find: -warn: unknown primary or operator
root@freebsd91:
FreeBSD freebsd91 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243826: Tue Dec 4 06:55:39 UTC 2012 <email address hidden>
root@freebsd91: