我正在尝试使用以下命令查找目录:
find /users/dan/ -name 'Prams' -type d
Run Code Online (Sandbox Code Playgroud)
我看到大量的“没有这样的文件或目录”输出。如果找不到任何东西,有没有办法让find闭嘴?
Boo*_*eus 22
尝试这个:
find /users/dan/ -name 'Prams' -type d 2>/dev/null
Run Code Online (Sandbox Code Playgroud)