龙空技术网

命令行打印树状目录结构

天真塌不下来 115

前言:

如今同学们对“html树状结构图”大致比较关注,我们都需要剖析一些“html树状结构图”的相关文章。那么小编同时在网上汇集了一些有关“html树状结构图””的相关文章,希望朋友们能喜欢,我们快快来了解一下吧!

Displays the directory structure of a path or of the disk in a drive graphically. The structure displayed by this command depends upon the parameters that you specify at the command prompt. If you don't specify a drive or path, this command displays the tree structure beginning with the current directory of the current drive.

Syntax

tree [<drive>:][<path>] [/f] [/a]
Parameters

Parameter

Description

<drive>:

Specifies the drive that contains the disk for which you want to display the directory structure.

<path>

Specifies the directory for which you want to display the directory structure.

/f

Displays the names of the files in each directory.

/a

Specifies to use text characters instead of graphic characters to show the lines that link subdirectories.

/?

Displays help at the command prompt.

补充内容:

命令行的命令和开关不区分大小写。/A - Specifies that alternative characters (plus signs, hyphens, and vertical bars) be used to draw the tree diagram so that it can be printed by printers that don't support the line-drawing and box-drawing characters.Examples

To display the names of all the subdirectories on the disk in your current drive, type:

tree \

显示当前目录的树:

tree .

把打印出的树状目录结构写入到tree.txt文件中

tree /f > tree.txt

打印当前目录下的文件夹和文件,输出:

$ tree . /f                                    卷 xxx 的文件夹 PATH 列表                             卷序列号为 xxxxxx                       D:\XP44MM\SHAPES\SHAPES.CLIENT\CLIENTAPP       │  .gitignore                                  │  babel.config.js                             │  index.css                                   │  index.js                                    │  jest.config.js                              │  jest.setup.js                               │  package-lock.json                           │  package.json                                │  prettier.config.js                          │  webpack.common.js                           │  webpack.dev.js                              │  webpack.prod.js                             │                                              ├─assets                                       │      favicon.ico                             │      index.html                              │                                              

打印出来的内容,文件夹前面一定有横线,文件前面一定没有横线。

标签: #html树状结构图