
---
url: /mod/bfind.md
---
# x bfind

A better file search utility based on Unix find command.

Supports ignoring common directories (like .git, .DS_Store) and result limiting.


::: tip
Default ignores .DS_Store, .git, .x-cmd.root directories

Use -i to add custom ignore patterns

Use -a for complete results (no line limit)
:::


## Examples

Example: Search current directory (default 100 lines)

```sh
x bfind
```

Example: Show all matching files (unlimited)

```sh
x bfind -a
```

Example: Limit output to 10 lines

```sh
x bfind -n 10
```

Example: Limit search depth to 5 levels

```sh
x bfind -d 5
```

Example: Add multiple ignore patterns

```sh
x bfind -i "node_modules" -i "__pycache__"
```

Example: Disable all ignore rules

```sh
x bfind --no-ignore
```

Example: Search current dir, depth 3, show all

```sh
x bfind . -a -d 3
```

Example: Search in specific directory

```sh
x bfind /usr/local -n 20
```

## Usage

```sh
x bfind [OPTIONS] [FLAGS]
```

## Options

| Name, Shorthand | Default | Description |
| ------- | ------- | ------- |
| `-i` |  | Add ignore pattern (supports multiple -i) |
| `-d` |  | Set maximum search depth (default 10) |


## Flags

| Name, Shorthand | Description |
| ------- | ------- |
| `-n` | Limit output lines (default 1000, -1 means unlimited) |
| `--no-ignore` | Disable all ignore rules |
| `-a`, `--all` | Show all results (no line limit, max depth) |
