Ade*_*taş 37
您可以使用 find
find . -type d > output.txt
要么 tree
tree -d > output.txt
tree,如果没有安装在您的系统上.
如果你正在使用 ubuntu
sudo apt-get install tree
如果你正在使用mac os.
brew install tree
find . -type d > list.txt
将列出当前路径下的所有目录和子目录.如果要列出当前路径以外的所有目录,请将.其更改为该其他路径.
如果要排除某些目录,可以使用否定条件过滤掉它们:
find . -type d ! -name "~snapshot" > list.txt