Commit Graph

7 Commits

Author SHA1 Message Date
sharkdp 33df48ebe4 Remove claim about unique search results 2020-04-03 10:07:46 +02:00
sharkdp c9dc617711 Rename --list to --list-details 2020-04-03 09:58:47 +02:00
sharkdp da5cd12b24 Add `-l`/`--list` option
Add a new `-l`/`--list` option to show more details about the search results. This is basically
an alias for `--exec-batch ls -l` with some additional `ls` options.
This can be used in order to:
    * see metadata like permissions, owner, file size, modification times (#491)
    * see symlink targets (#482)
    * achieve a deterministic output order (#324, #196, #159)
    * avoid duplicate search results when multiple search paths are given (#405)
2020-04-03 09:58:47 +02:00
sharkdp d43827fe57 Add --max-results=<count> option
This new option can be used instead of piping to `head -n <count>` for
improved performance:

| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|:---|---:|---:|---:|---:|
| `fd --max-buffer-time=0 flow.yaml` | 153.9 ± 2.5 | 151.3 | 170.3 | 4.21 ± 5.86 |
| `fd --max-buffer-time=0 flow.yaml \| head -n 1` | 145.3 ± 17.4 | 111.0 | 180.2 | 3.98 ± 5.55 |
| `fd --max-results=1 flow.yaml` | 36.5 ± 50.8 | 7.2 | 145.7 | 1.00 |

Note: there is a large standard deviation on the last result due to the
non-deterministic file system traversal. With `--max-results`, we don't
have to traverse the whole filesystem tree, so it's all about luck.

closes #472
closes #476
2020-04-02 20:27:41 +02:00
David Peter ee673c92d3
Added changes for upcoming release 2020-04-02 16:58:27 +02:00
David Peter decd7f2ea3
Update CHANGELOG.md 2020-04-02 16:54:19 +02:00
David Peter f3e1ea150c
Add CHANGELOG 2020-04-02 16:53:12 +02:00