find.flexfs
find.flexfs provides fast filesystem search by querying the metadata server directly, bypassing the FUSE layer. It supports filters on inode attributes, timestamps, size, cost, permissions, and file type.
find.flexfs [flags] [path...]If no path is specified, the current directory is used. Can operate from within a flexFS mount or connect directly via --metaAddr and --volume.
Output Control
Section titled “Output Control”| Flag | Type | Default | Description |
|---|---|---|---|
--fields | string slice | path | Output fields (comma-separated). Use all for all fields. |
--header | bool | false | Include header row in output |
--limit | uint64 | 0 | Maximum number of results (0 = unlimited) |
--noDecode | bool | false | Print base32-encoded paths |
--outputFile, -o | string | Output file path |
Available fields: path, ino, mode, type, perm, blocks, size, size_bin, cost, nlink, uid, gid, ctime, mtime, atime, btime, xattrs.
The cost field is an estimated monthly storage cost in US dollars ($/month). See the analyze.flexfs cost field documentation for how it is calculated.
Connection
Section titled “Connection”| Flag | Type | Default | Description |
|---|---|---|---|
--metaAddr | string | Metadata server address (must pair with --volume) | |
--volume | string | Volume UUID or name (must pair with --metaAddr) |
Inode Filters
Section titled “Inode Filters”| Flag | Type | Default | Description |
|---|---|---|---|
--empty | bool | false | Filter for empty files or directories |
--gid | uint32 | 0 | Filter by group ID |
--ino | uint64 | 0 | Filter by inode number |
--name | string | Filter by dentry name (supports glob patterns) | |
--perm | uint32 | 0 | Required permission bits (octal with 0 prefix, e.g. 0755). Matches when (mode & permMask) == perm. |
--permMask | uint32 | 0777 | Bits of the file mode to test (octal with 0 prefix, max 07777). Default 0777 tests owner/group/other. Set to 07777 to also test setuid/setgid/sticky. |
--sparse | bool | false | Filter for sparse files |
--type | string | Filter by inode type: b, c, d, f, l, p, s | |
--uid | uint32 | 0 | Filter by user ID |
Size and Block Filters
Section titled “Size and Block Filters”| Flag | Type | Default | Description |
|---|---|---|---|
--maxBlocks | uint64 | 0 | Maximum blocks filter |
--maxCost | float64 | 0 | Maximum estimated monthly cost filter ($/month) |
--maxNlink | uint32 | 0 | Maximum hard link count filter |
--maxSize | uint64 | 0 | Maximum byte size filter |
--maxSizeBin | uint32 | 0 | Maximum size bin filter (0-74) |
--minBlocks | uint64 | 0 | Minimum blocks filter |
--minCost | float64 | 0 | Minimum estimated monthly cost filter ($/month) |
--minNlink | uint32 | 0 | Minimum hard link count filter |
--minSize | uint64 | 0 | Minimum byte size filter |
--minSizeBin | uint32 | 0 | Minimum size bin filter (0-74) |
Timestamp Filters
Section titled “Timestamp Filters”Timestamp values are in seconds since epoch (Unix time).
| Flag | Type | Default | Description |
|---|---|---|---|
--maxAtime | uint64 | 0 | Maximum access time |
--maxBtime | uint64 | 0 | Maximum birth time |
--maxCtime | uint64 | 0 | Maximum change time |
--maxMtime | uint64 | 0 | Maximum modification time |
--minAtime | uint64 | 0 | Minimum access time |
--minBtime | uint64 | 0 | Minimum birth time |
--minCtime | uint64 | 0 | Minimum change time |
--minMtime | uint64 | 0 | Minimum modification time |
Depth Control
Section titled “Depth Control”| Flag | Type | Default | Description |
|---|---|---|---|
--maxDepth | uint32 | 0 | Maximum query depth (0 = unlimited) |
--minDepth | uint32 | 0 | Minimum query depth |
Internal Flags
Section titled “Internal Flags”| Flag | Type | Default | Description |
|---|---|---|---|
--noMetaSSL | bool | false | Disable SSL for metadata server connections |
Examples
Section titled “Examples”File discovery
Section titled “File discovery”Find all files larger than 1 GiB:
find.flexfs --minSize 1073741824 --type f /mnt/flexfsFind files by name pattern with full metadata:
find.flexfs --name "*.bam" --fields all --header /mnt/flexfs/dataFind empty directories (candidates for cleanup):
find.flexfs --type d --empty /mnt/flexfsFind all symlinks under a path:
find.flexfs --type l --fields path,size /mnt/flexfs/dataCost and storage analysis
Section titled “Cost and storage analysis”Find the most expensive files (costing more than $1/month):
find.flexfs --minCost 1 --type f --fields path,size,cost --header /mnt/flexfsFind cold files (not accessed in over 6 months, size bin 6+) that are still large:
find.flexfs --minSizeBin 6 --minSize 1073741824 --type f \ --fields path,size,size_bin,cost --header /mnt/flexfsTimestamp queries
Section titled “Timestamp queries”Find files not accessed since January 1 2025 (stale data candidates):
# 2025-01-01T00:00:00Z = 1735689600find.flexfs --maxAtime 1735689600 --type f /mnt/flexfsFind files modified in a specific window (e.g. during an incident):
# 2025-03-15 00:00:00Z = 1741996800, 2025-03-16 00:00:00Z = 1742083200find.flexfs --minMtime 1741996800 --maxMtime 1742083200 --type f \ --fields path,size,mtime --header /mnt/flexfsFind files created in the last 7 days:
# Use $(date -d '7 days ago' +%s) on Linux or $(date -v-7d +%s) on macOSfind.flexfs --minBtime $(date -v-7d +%s) --type f /mnt/flexfsPermissions audit
Section titled “Permissions audit”Find files with exact permissions rwxrwxrwx:
find.flexfs --perm 0777 --type f --fields path,perm /mnt/flexfsFind world-writable files (other-write bit set):
find.flexfs --perm 02 --permMask 02 --type f --fields path,perm /mnt/flexfsFind files with the setuid bit set:
find.flexfs --perm 04000 --permMask 04000 --type f --fields path,perm /mnt/flexfsOwnership
Section titled “Ownership”Find all files owned by a specific user:
find.flexfs --uid 1001 --type f --fields path,size,uid /mnt/flexfsSparse files
Section titled “Sparse files”Find sparse files (logical size exceeds allocated blocks):
find.flexfs --sparse --type f --fields path,size,blocks /mnt/flexfsExporting and direct connection
Section titled “Exporting and direct connection”Export a full file inventory to TSV:
find.flexfs --fields all --header --type f \ --outputFile /tmp/inventory.tsv /mnt/flexfsQuery a volume directly without a local mount:
find.flexfs --metaAddr meta.example.com:443 --volume my-vol --type d /Output Format
Section titled “Output Format”Output is tab-separated. The columns correspond to the --fields list. When --header is set, the first line contains field names.