ASCII Library for Creating “Pretty” Directory Trees?

后端 未结 10 1084
时光说笑
时光说笑 2020-12-04 07:33

Is there some *nix tool or perl/php library that will let you easily create directory tree visualizations that look like the following?

www
|-- private
|             


        
10条回答
  •  离开以前
    2020-12-04 07:56

    How about this example from Unix Tree / Linux Tree:

    ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/'  
    

提交回复
热议问题