ArticleDirectory
1. Origin
Some of us get a file, which we usually don't know clearly. For example, if you get a friend and send it to youSource codeIf you can see the source at a glanceCodeHow nice the directory structure should be.
My previous practices are:
$ LS-R
However, we cannot see the level of the directory structure. Can we write a pstree-like tool to complete this task?
Certainly. For example, we want to see the GNU coreutils source code directory structure:
~ /Repo/coreutils $ lstree | grep '/$'m4/Gl/M4/lib/modules/tests/po/doc/man/lib/src/old/textutils/sh- utils/fileutils/gnulib/tests/MV/RM/chown/DD/split/ID/tail-2/PR/chmod/DF/ln/readlink/rmdir/CP/ls/ misc/FMT/chgrp/mkdir/install/du/touch/build-Aux/scripts/Git-hooks/gnulib-tests/
In this way, you can clearly understand how GNU coreutils organizes directories.
2. Source Code
Jatsz/coreutils-ex
Git clone git: // github.com/jatsz/coreutils-ex.git
Have fun!