Preloader image
DDD

리눅스

Linux & Windows Command - tree (디렉토리구조 분석 할때)

작성자 관리자 (admin)
조회수 821
입력일 2021-11-11 16:06:49

리눅스와 윈도우 명령어 체계가 다릅니다.

리눅스(Linux) - 호스팅 업체는 막혀 있는 경우가 많고 기업 프로젝트 시 대부분 가능.

$ tree
전체 파일까지 출려됩니다.

├── ROOT.md
└── main
    ├── A
    ├── B
    │   └── B-1
    ├── C
    └── index.do

$ tree -d
디렉토리 구조만 출력 됩니다. (AA가 형상 구조 문서를 만들때 유용합니다.)

└── main
    ├── A
    ├── B
    │   └── B-1
    └── C

# tree | grep "index.do"
index.do 를 찾아 존재 유무를 알때 사용합니다.

   └── index.do

Linux에 package가 존재 하지 않을때

# tree

Command 'tree' not found, but can be installed with:

apt install tree

# apt install tree
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  tree
0 upgraded, 1 newly installed, 0 to remove and 91 not upgraded.
Need to get 43.0 kB of archives.
After this operation, 115 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 tree amd64 1.8.0-1 [43.0 kB]
Fetched 43.0 kB in 1s (31.4 kB/s)
Selecting previously unselected package tree.
(Reading database ... 32302 files and directories currently installed.)
Preparing to unpack .../tree_1.8.0-1_amd64.deb ...
Unpacking tree (1.8.0-1) ...
Setting up tree (1.8.0-1) ...
Processing triggers for man-db (2.9.1-1) ...
.

 

윈도우 - 프로젝트 작업 시 해당 솔루션이나 프로젝트의 구조를 최초로 파악 할때 사용하면 유용합니다.

C:\_PROJECT\apache-tomcat-9.0.41>tree
C 볼륨에 대한 폴더 경로의 목록입니다.
볼륨 일련 번호는 94C5-6830입니다.
C:.
├─bin
├─conf
├─lib
├─logs
├─temp
├─webapps
│  ├─docs
│  │  ├─annotationapi
│  │  ├─api
│  │  ├─appdev
│  │  │  └─sample
│  │  │      ├─docs
│  │  │      ├─src
│  │  │      │  └─mypackage
│  │  │      └─web
│  │  │          ├─images
│  │  │          └─WEB-INF
│  │  ├─architecture
│  │  │  ├─requestProcess
│  │  │  └─startup
│  │  ├─config
│  │  ├─elapi
│  │  ├─images
│  │  │  └─fonts
│  │  ├─jaspicapi
│  │  ├─jspapi
│  │  ├─servletapi
│  │  ├─tribes
│  │  ├─WEB-INF
│  │  └─websocketapi
│  ├─examples
│  │  ├─jsp
│  │  │  ├─async
│  │  │  ├─cal
│  │  │  ├─checkbox
│  │  │  ├─colors
│  │  │  ├─dates
│  │  │  ├─error
│  │  │  ├─forward
│  │  │  ├─images
│  │  │  ├─include
│  │  │  ├─jsp2
│  │  │  │  ├─el
│  │  │  │  ├─jspattribute
│  │  │  │  ├─jspx
│  │  │  │  ├─misc
│  │  │  │  ├─simpletag
│  │  │  │  └─tagfiles
│  │  │  ├─jsptoserv
│  │  │  ├─num
│  │  │  ├─plugin
│  │  │  │  └─applet
│  │  │  ├─security
│  │  │  │  └─protected
│  │  │  ├─sessions
│  │  │  ├─simpletag
│  │  │  ├─snp
│  │  │  ├─tagplugin
│  │  │  └─xml
│  │  ├─META-INF
│  │  ├─servlets
│  │  │  ├─images
│  │  │  └─nonblocking
│  │  ├─WEB-INF
│  │  │  ├─classes
│  │  │  │  ├─async
│  │  │  │  ├─cal
│  │  │  │  ├─checkbox
│  │  │  │  ├─colors
│  │  │  │  ├─compressionFilters
│  │  │  │  ├─dates
│  │  │  │  ├─error
│  │  │  │  ├─examples
│  │  │  │  ├─filters
│  │  │  │  ├─http2
│  │  │  │  ├─jsp2
│  │  │  │  │  └─examples
│  │  │  │  │      ├─el
│  │  │  │  │      └─simpletag
│  │  │  │  ├─listeners
│  │  │  │  ├─nonblocking
│  │  │  │  ├─num
│  │  │  │  ├─sessions
│  │  │  │  ├─trailers
│  │  │  │  ├─util
│  │  │  │  ├─validators
│  │  │  │  └─websocket
│  │  │  │      ├─chat
│  │  │  │      ├─drawboard
│  │  │  │      │  └─wsmessages
│  │  │  │      ├─echo
│  │  │  │      └─snake
│  │  │  ├─jsp
│  │  │  │  └─applet
│  │  │  ├─jsp2
│  │  │  ├─lib
│  │  │  └─tags
│  │  └─websocket
│  ├─host-manager
│  │  ├─css
│  │  ├─images
│  │  ├─META-INF
│  │  └─WEB-INF
│  │      └─jsp
│  ├─manager
│  │  ├─css
│  │  ├─images
│  │  ├─META-INF
│  │  └─WEB-INF
│  │      └─jsp
│  └─ROOT
│      └─WEB-INF
└─work

C:\_PROJECT\apache-tomcat-9.0.41>

^