/usr/bin/ceres-tree-find is in python-ceres 0.10.0~git20130913-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 | #! /usr/bin/python
import sys
from optparse import OptionParser
from ceres import CeresTree
parser = OptionParser(usage='''%prog [options] <path/to/tree/root/> <metric-pattern>''')
parser.add_option('--fromtime', default=None, type='int')
parser.add_option('--untiltime', default=None, type='int')
parser.add_option('--fspath', action='store_true')
options, args = parser.parse_args()
if len(args) < 2:
parser.print_usage()
sys.exit(1)
root_dir = args[0]
pattern = args[1]
tree = CeresTree(root_dir)
for node in tree.find(pattern, fromTime=options.fromtime, untilTime=options.untiltime):
if options.fspath:
print node.fsPath
else:
print node.nodePath
|