71 command-line directory find
我的服务器上有一个名为“exampledocs”的目录。我尝试使用以下方法找到它的位置:
ls -d */ | grep -E 'exampledocs'
Run Code Online (Sandbox Code Playgroud)
和
find * -regextype posix-extended \-regex 'exampledocs' \-type d
Run Code Online (Sandbox Code Playgroud)
和
grep "exampledocs" * --recursive
Run Code Online (Sandbox Code Playgroud)
没有任何效果。如何从命令行执行此操作?我正在使用 Ubuntu Server 11.0。
Noa*_*led 86
这也应该工作
find folder_full_path -name exampledocs -type d
Run Code Online (Sandbox Code Playgroud)
小智 70
find / -xdev 2>/dev/null -name "exampledocs"
Run Code Online (Sandbox Code Playgroud)
注意:这是来自 Debian,但它应该可以工作。