mfind(1)
π mfind(1) β the Manta Commands era β¨
okay so welcome to mfind, bestie. it lives in the Manta Commands family and it's genuinely one of my faves. quick heads up before we dive in: the page header up top is mfind(1) and the whole thing is filed under the Manta Commands manual β but like, that's just the paperwork, the actual vibe is down here π
β¨ NAME β¨
mfind β search for objects in a directory hierarchy. that's it, that's the whole job. it descends, it finds, it slays π
π¦ SYNOPSIS π¦
mfind [OPTION...] PATH...
you give it options (optional, obvs) and then one or more PATHs. multiple paths? totally allowed. we love a flexible icon.
πΈ DESCRIPTION πΈ
so mfind recursively descends the directory tree for each path you list, and it lists the names that are the specified type β or literally all of them if you didn't specify a type. no type? no problem. main character energy either way π
here's the tea though: unlike GNU/BSD find, mfind is not yet sophisticated enough to support full expression matching. not yet!! she's growing!! π± but she does (currently) allow a --name option that supports Regular Expression matching, which is honestly the part you'll use 90% of the time. iykyk.
and when you pass the --json option, a stream of JSON objects gets printed. each JSON object contains the fields from the Manta ListDirectory API endpoint (https://apidocs.tritondatacenter.com/manta/api.html#ListDirectory), PLUS these client-side added fields:
depthβ an integer directory depth under the given directory, starting from0.parentβ the full directory path of the entry.
so you get the API fields and extra bonus fields. it's giving overachiever and i'm obsessed π«Ά
π₯ EXAMPLES π₯
okay this one is iconic, look:
$ mfind -t o -n '.+.log$' ~~/stor/logs/foo/2013/04/29
~~/stor/logs/foo/2013/04/29/00/gandalf.log
/$USER/stor/logs/foo/2013/04/29/00/frodo.log
~~/stor/logs/foo/2013/04/29/01/sam.log
/$USER/stor/logs/foo/2013/04/29/01/aragorn.log
objects only (-t o), names matching '.+.log$', under that one path. and out come the logs. gandalf, frodo, sam, aragorn β the whole fellowship showed up ππ
π OPTIONS π
-a,--accountlogin β authenticate as account (login name). like, who are you logging in as, bestie.-h,--helpβ print a help message and exit. bless.-i,--insecureβ this option explicitly allows "insecure" SSL connections and transfers. all SSL connections are attempted to be made secure by using the CA certificate bundle installed by default. so like, it's a deliberate "yes i know, do it anyway" move π-j,--jsonβ output a newline-separated JSON stream of find results. json girlies rise π-k,--keyfingerprint β authenticate using the SSH key described by FINGERPRINT. the key must either be in~/.sshor loaded in the SSH agent viassh-add.-l,--limitβ limit number of entries returned per request. pacing herself π-n,--nameregexp β only return entries that have a name matching RegExp. RegExp is a Javascript Regular Expression. js regex? in my find? it's more likely than you think β¨-p,--parallelNUM β limit concurrent operations to NUM. default is50. fifty!! she's busy.-s,--sizeSIZE β only list objects that are greater than SIZE bytes.-t,--typetype β specifydfor directories, andofor objects. if specified, only names of that type will be returned. pick your fighter π--maxdepthβ only print items items less than this depth. (yes, "items items" β i don't make the rules, i just report them π)--mindepthβ only print items with at least this depth.--role=ROLE,ROLE,...β specify which roles to assume for the request. comma-separated list, go off π--useruser β authenticate as user under account.-u,--urlurl β Manta base URL (such ashttps://us-central.manta.mnx.io).-v,--verboseβ print debug output tostderr. repeat option to increase verbosity. stack thosevs, bestie π₯
π§ ENVIRONMENT π§
nature is healing, the environment variables are doing the work for you:
MANTA_USERβ in place of-a,--account.MANTA_SUBUSERβ in place of--user.MANTA_KEY_IDβ in place of-k,--key.MANTA_ROLEβ in place of--role.MANTA_URLβ in place of-u,--url.MANTA_TLS_INSECUREβ in place of-i,--insecure.
and one more little shortcut that lives here: the shortcut ~~ is equivalent to /:login where :login is the account login name. so ~~/stor is basically "my stor". cute, convenient, iconic π
β DIAGNOSTICS β
when using the -v option, diagnostics will be sent to stderr in bunyan output format. as an example of tracing all information about a request, try:
$ mfind -vv ~~/stor 2>&1 | bunyan
two vs for full trace, pipe it into bunyan, and enjoy the show. 2>&1 is doing the heavy lifting there so don't skip it π«Ά
π BUGS π
- DSA keys do not work when loaded via the SSH agent. not me finding this out the hard way π
- report bugs at Github (
https://github.com/TritonDataCenter/node-manta/issues). be nice, be specific, bring receipts.
okay that's the whole page!! every flag, every env var, every example, gone through, nothing skipped, nothing invented. now go find some objects, bestie π
β with love, from the Manta era, July 2016, mfind(1) out π
π¦ where this page comes from
- nixos 26.05: manta 5.4.2
- nixpkgs unstable: manta 5.4.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms