命令行大全

tree

嚯嚯 发表于 2020-06-22 16:56浏览次数:

使用tree命令,用户可以轻松直观的查看文件和文件夹列表。

查看英文版

目录:

1 tree 运行系统环境

2 tree 的语法

3 tree 示例

tree 运行系统环境

Windows xp

Windows vista

Windows 2000

Windows 7

Windows 8

Windows 10

All Versions of MS-DOS

tree 的语法

TREE [Drive:[[Path] [/F] [/A]
Drive:\Path 驱动器和包含磁盘的目录,用于显示目录结构。
/F 显示每个目录中包含的文件名。
/A 用于链接线的扩展字符,而不是图形字符。/ a用于不支持图形字符的代码页,并将输出发送到不能正确解释图形字符的打印机。
TREE [Drive:[[Path] [/F] [/A]
Drive:\Path Drive and directory containing disk for the display of directory structure.
/F Displays the file names contained in each directory.
/A Extended characters used for linking lines instead of graphic characters. /a is used with code pages that do not support graphics characters and to send output to printers that do not properly interpret graphics characters.

查看英文版

查看中文版

tree 示例

单独键入的tree命令会生成当前目录的列表和概述(如右图所示)。

tree

在此示例中,C:是当前目录,“ banners”是许多目录之一,而“ big”是“ cdn”目录的子目录。

tree /F
tree /F

上面的命令将树命令与/ F开关一起使用。结果输出将包括位于树中每个目录中的文件名。根据每个目录中有多少个文件,树列表可能会很长。

The tree command typed alone produces a listing and overview of the current directory (shown in the image to the right).

tree

In this example, C: is the current directory, "banners" is one of the many directories, and "big" is a subdirectory of the "cdn" directory.

tree /F
tree /F

The command above uses the tree command with the /F switch. The resulting output would include the names of files located in each of the directories in the tree. Depending on how many files are located in each directory, the tree listing could be quite long.

要将目录的结构以及其他选项输出到文件,请尝试使用dir命令。

To output the structure of a directory to a file, along with other options, try using the dir command.

查看英文版

查看中文版