disk usage depth
du -h로 현재 폴더 용량만 확인
disk usage depth
du -h [최대 깊이] [탐색 폴더]
du -h --max-depth=0 .
현재 폴더 총 용량만 볼 때
mac에서는
du -sh -d 0 .
-s: 하위 항목 합계만 표시 -h: 단위 읽기 편하게 (KB, MB, GB) -d 0: 깊이 0. 현재 폴더 총합만. (Linux --max-depth=0과 같음)
여기서 배울 것
- du -h로 폴더 용량 확인
- --max-depth=0으로 현재 폴더 용량만 뽑기
- 맥은 du -sh -d 0으로 퉁침
- s, h, d 옵션들 잘 쓰기
원본 파일 보기 (.claude/skills/tn-disk-usage-depth/SKILL.md)
---
name: Check Current Folder Disk Usage
description: This skill should be used when the user asks to check the total disk usage of the current directory or a specific folder, without listing the sizes of subdirectories (e.g., '현재 폴더 용량 확인', '특정 폴더 총 크기').
version: 1.0.0
source: /home/son/prj/resume/backup_notes_260317/notion/Tech Note/disk usage depth 304d7efd824b806e83e7e400db66c68b.md
---
# disk usage depth
du -h [최대 깊이] [탐색 폴더]
du -h —max-depth=0 .
mac에서는
```bash
du -sh -d 0 .
```
- **`s`**: (Summary) 하위 항목의 합계만 표시합니다.
- **`h`**: (Human-readable) 단위를 읽기 편하게(KB, MB, GB) 표시합니다.
- **`d 0`**: (Depth) 깊이를 0으로 설정하여 현재 폴더의 총합만 보여줍니다. (Linux의 `-max-depth=0`과 동일)