갈루아의 반서재

유용하고 손쉽게 다룰 수 있는 패키지 tree를 설치해보자.

tree는 디렉토리 구조를 보여주는 패키지로 아래와 같이 간단히 설치할 수 있다.


[설치] # apt-get install tree
[실행] # tree antifragile

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
root@localhost:~/antifragile# apt-get install tree
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
다음 새 패키지를 설치할 것입니다:
  tree
0개 업그레이드, 1개 새로 설치, 0개 제거 및 158개 업그레이드 안 함.
37.8 k바이트 아카이브를 받아야 합니다.
이 작업 후 109 k바이트의 디스크 공간을 더 사용하게 됩니다.
받기:1 http://kr.archive.ubuntu.com/ubuntu/ trusty/universe tree amd64 1.6.0-1 [                                                                             37.8 kB]
내려받기 37.8 k바이트, 소요시간 0초 (591 k바이트/초)
Selecting previously unselected package tree.
(데이터베이스 읽는중 ...현재 62911개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../tree_1.6.0-1_amd64.deb ...
Unpacking tree (1.6.0-1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
tree (1.6.0-1) 설정하는 중입니다 ...
root@localhost:~/antifragile# tree antifragile
antifragile
├── __init__.py
├── __init__.pyc
├── __pycache__
│   ├── __init__.cpython-35.pyc
│   └── settings.cpython-35.pyc
├── settings.py
├── settings.pyc
├── urls.py
├── urls.pyc
├── views.py
├── views.pyc
├── wsgi.py
└── wsgi.pyc
 
1 directory, 12 files
cs




옵션을 주어서 디렉토리만 출력할 수도 있고(# tree antifragile -d),

타입별로 색깔을 다르게(# tree antifragile -c)할 수도 있다.