[Share Experiences] 分享个神仙级指令:fd (find的升级替代版) Resolved
Tofloor
poster avatar
锵锵枪ᯤ
deepin
16 hours ago
Author

之前用find,怎么用都觉得别扭,扭曲的复杂的参数,就不像给人用的,但是这个命令却又是非常高频的一个指令

安装 fdfind

sudo apt update

sudo apt install fd-find

默认命令是 fdfind。想直接用 fd:把 fdfind 映射成 fd

mkdir -p ~/.local/bin

ln -s $(which fdfind) ~/.local/bin/fd

然后加到 PATH(如果没加过):

简单用法(替代 find)

fd txt          # 当前目录搜含 txt 的文件
fd test ~/code  # 在 ~/code 下搜 test
Reply Favorite View the author
All Replies
avatar
9136
deepin
15 hours ago
#1

终端用户每天都要感谢fd和rg

Reply View the author
avatar
ecjtusbs
deepin
15 hours ago
#2

2026年了,我们还在使用古老的find 命令😂

Reply View the author