我知道我可以这样做来获取 /vz/root 中的目录列表:
find /vz/root/ -type d -maxdepth 1 -exec echo {} \;
Run Code Online (Sandbox Code Playgroud)
但是如何编辑它以仅列出不包含名为“php-5.3.3”的子目录的目录?因此,如果有 3 个目录 /vz/root/101、/vz/root/102 和 /vz/root/103,并且其中两个包含 php-5.3.3 子目录,则它只会回显不包含该目录的路径没有它。
linux ×1