fd is a program to find entries in your filesytem. It is a simple, fast and user-friendly alternative to find.
用法
快速入门
查找当前目录的文件名中包含字符串 hello 的项目:
fd hello
正则匹配以 vi 开头的文件:
fd '^vi'
指定在相对路径 test 中搜索:
fd '^vi' test
列出所有 png 图片:
fd -e png
列出所有名字包含 hello 的 png 图片:
fd -e png hello
稍微进阶
对所有搜索到文件执行某种操作
fd . /mnt/documents -e txt -x echo {/}
-x对每个搜索项执行命令,其中:
{} path{/} basename{//} parent directory{.} path without file extension{/.} basename without file extension
