$ du -sh *
765M    BoostEchoClient
6.2M    fmt_join
51K     git
157K    malloc_trim
12M     oneTBB-2021.5.0
3.1M    oneTBB-2021.5.0.zip
61M     oneapi-tbb-2021.5.0-win
16M     oneapi-tbb-2021.5.0-win.zip
2.1G    pp
28K     pp_20211108.zip
51M     protobuf-all-3.19.4
9.6M    protobuf-all-3.19.4.zip
2.9M    protoc-3.19.4-win32
1.2M    protoc-3.19.4-win32.zip
3.8M    protoc-3.19.4-win64
1.5M    protoc-3.19.4-win64.zip
24K     tar
53M     test
52M     test2

linux 에서 du 명령어를 통해 디렉토리 사용량을 확인할 수 있다. du -sh * 를 통해 현재 경로 1 depth 사용량을 알 수 있다.

  -s, --summarize       display only a total for each argument
  -h, --human-readable  print sizes in human readable format (e.g., 1K 234M 2G)

s 옵션은 요약, h 옵션은  K / M / G 단위로 보여달라는 의미다.

https://gun0912.tistory.com/22

 

[Linux]남은 용량 확인하기

디스크 전체 남은용량 확인 - df : 남은용량 확인(기본 명령어) - df -h : 깔끔하게 정리해서 보여줌 - df . : 현재 경로의 디스크용량만 확인 - df -m, -k : megabyte, kilobyte단위로 확인 현재 경로 아래의 사

gun0912.tistory.com

 

728x90

+ Recent posts