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 | |-- app | | |-- php | | | |-- classes | | | +-- scripts | | |-- settings | | +-- sql | +-- lib | +-- ZendFramework-HEAD +-- public |-- css |-- images +-- scripts
Creation of an entire directory tree can be accomplished with the mkdir command, which (as its name suggests) is used to make directories. The -p option tells mkdir to create not only a subdirectory but also any of its parent directories that do not already exist.
Your directory tree generator tool will run on the command line. It'll take arguments, process them, and display a directory tree diagram on the terminal window. It can also save the output diagram to a file in markdown format.
Tree command to generate nested directory structure with markdown. Copy the output to the markdown file and enclose it in three backticks(```markdown) and end with three backticks. And another way is to `pre tag in HTML which preserves the line breaks and spaces.
How about this example from Unix Tree / Linux Tree:
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With