Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

tree 는 폴더의 하위 구조를 계층적으로 표시해 주는 유틸리티로 전체 구조를 대략적으로 파악할 때 유용.


주요 옵션

optionparam의미
-d
List directories only.
-f
Prints the full path prefix for each file.
-i
 Makes tree not print the indentation lines, useful when used in conjunction with the -f option.
-Ipattern

Do not list those files that match the wild-card pattern.


-PpatternList  only  those files that match the wild-card pattern. 
-Llevel

-N

tree는 ascii 가 아닌 문자는 \332 같이 8진수가 인코딩해서 표시하므로 한글이 깨져 보임.

-N 옵션을 추가하면 한글이 제대로 표시됨.



2 depth만 표시

Code Block
$ tree -L 2 -N


2 depth 와 directory 만 표시

Code Block
$ tree -L 2 -d -N


2 depth, directory only, no indentation + full path

...