Skip to content

Commit 7794837

Browse files
committed
Write Tech Post " DU(Disk Usage) 명령어를 아시나요? "
1 parent 3ac7799 commit 7794837

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
layout: post
3+
title: " DU(Disk Usage) 명령어를 아시나요? "
4+
categories: Tech
5+
author: goodGid
6+
use_math: true
7+
---
8+
* content
9+
{:toc}
10+
11+
## DU(Disk Usage)
12+
13+
* du -hs 명령어는 Linux 또는 macOS 등의 유닉스 계열 운영체제에서
14+
15+
디스크 사용량(Disk Usage)을 확인할 때 사용하는 명령어이다.
16+
17+
### 옵션
18+
19+
| 옵션 | 설명 |
20+
| ------------------- | --------------------------------------------------- |
21+
| `-h` | **Human-readable**: 용량을 KB, MB, GB 등으로 보기 쉽게 표시 |
22+
| `-s` | **Summarize**: 지정한 경로의 총합만 출력하고, 하위 항목은 생략 |
23+
| `-a` | **All files**: 디렉토리뿐 아니라 파일들도 각각의 크기 노출 |
24+
| `-c` | **Total**: 모든 출력의 합계를 마지막에 출력 |
25+
| `-k` | 용량을 KB 단위로 표시 (기본 단위는 블록 수) |
26+
| `-m` | 용량을 MB 단위로 표시 |
27+
| `--time` | 각 항목의 마지막 수정 시간을 함께 출력 |
28+
| `--exclude=PATTERN` | 특정 패턴을 제외 (ex: `--exclude="*.log"`) |
29+
30+
31+
---
32+
33+
### Example
34+
35+
> du -hs, du -hsc
36+
37+
![](/assets/img/tech/Tech-Command-DU-Disk-Usage_1.png)
38+
39+
> du -hs *, du -hsc *
40+
41+
![](/assets/img/tech/Tech-Command-DU-Disk-Usage_2.png)
42+
43+
---
44+
45+
## Summary
46+
47+
* 서버를 관리한다면 유용하게 사용할 수 있는 du 명령어 꼭 기억하자.
4.44 KB
Loading
20.2 KB
Loading

0 commit comments

Comments
 (0)