IT 공부내용 정리/Linux

터미널 명령어 - du 디렉토리나 사용자별 디스크 사용량을 알고 싶을 때

따뜻한 차가움 2025. 3. 21. 14:37

사용 버전 : Linux 우분투(레드햇 계열) 24.04.01 LTS 버전
사용한 시스템 지역/언어 : 대한민국/한글

man du 원문

더보기

DU(1)                            User Commands                           DU(1)

NAME
       du - estimate file space usage

SYNOPSIS
       du [OPTION]... [FILE]...
       du [OPTION]... --files0-from=F

DESCRIPTION
       Summarize  device  usage  of the set of FILEs, recursively for directo‐
       ries.

       Mandatory arguments to long options are  mandatory  for  short  options
       too.

       -0, --null
              end each output line with NUL, not newline

       -a, --all
              write counts for all files, not just directories

       --apparent-size
              print  apparent sizes rather than device usage; although the ap‐
              parent size is usually smaller, it may be larger due to holes in
              ('sparse') files, internal fragmentation, indirect  blocks,  and
              the like

       -B, --block-size=SIZE
              scale  sizes  by  SIZE  before printing them; e.g., '-BM' prints
              sizes in units of 1,048,576 bytes; see SIZE format below

       -b, --bytes
              equivalent to '--apparent-size --block-size=1'

       -c, --total
              produce a grand total

       -D, --dereference-args
              dereference only symlinks that are listed on the command line

       -d, --max-depth=N
              print the total for a directory (or file, with --all) only if it
              is  N  or  fewer  levels  below  the  command   line   argument;
              --max-depth=0 is the same as --summarize

       --files0-from=F
              summarize  device  usage of the NUL-terminated file names speci‐
              fied in file F; if F is -, then read names from standard input

       -H     equivalent to --dereference-args (-D)

       -h, --human-readable
              print sizes in human readable format (e.g., 1K 234M 2G)

       --inodes
              list inode usage information instead of block usage

       -k     like --block-size=1K

       -L, --dereference
              dereference all symbolic links

       -l, --count-links
              count sizes many times if hard linked

       -m     like --block-size=1M

       -P, --no-dereference
              don't follow any symbolic links (this is the default)

       -S, --separate-dirs
              for directories do not include size of subdirectories

       --si   like -h, but use powers of 1000 not 1024

       -s, --summarize
              display only a total for each argument

       -t, --threshold=SIZE
              exclude entries  smaller  than  SIZE  if  positive,  or  entries
              greater than SIZE if negative

       --time show time of the last modification of any file in the directory,
              or any of its subdirectories

       --time=WORD
              show  time  as WORD instead of modification time: atime, access,
              use, ctime or status

       --time-style=STYLE
              show times using STYLE, which can be: full-iso,  long-iso,  iso,
              or +FORMAT; FORMAT is interpreted like in 'date'

       -X, --exclude-from=FILE
              exclude files that match any pattern in FILE

       --exclude=PATTERN
              exclude files that match PATTERN

       -x, --one-file-system
              skip directories on different file systems

       --help display this help and exit

       --version
              output version information and exit

       Display   values  are  in  units  of  the  first  available  SIZE  from
       --block-size, and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE  environ‐
       ment  variables.   Otherwise,  units  default  to 1024 bytes (or 512 if
       POSIXLY_CORRECT is set).

       The SIZE argument is an integer and  optional  unit  (example:  10K  is
       10*1024).   Units are K,M,G,T,P,E,Z,Y,R,Q (powers of 1024) or KB,MB,...
       (powers of 1000).  Binary prefixes can be used, too: KiB=K, MiB=M,  and
       so on.

PATTERNS
       PATTERN  is  a shell pattern (not a regular expression).  The pattern ?
       matches any one character, whereas * matches any  string  (composed  of
       zero,  one  or  multiple  characters).  For example, *.o will match any
       files whose names end in .o.  Therefore, the command

              du --exclude='*.o'

       will skip all files and subdirectories ending in .o (including the file
       .o itself).

AUTHOR
       Written by Torbjorn Granlund, David MacKenzie,  Paul  Eggert,  and  Jim
       Meyering.

REPORTING BUGS
       GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
       Report any translation bugs to <https://translationproject.org/team/>

COPYRIGHT
       Copyright  ©  2023  Free Software Foundation, Inc.  License GPLv3+: GNU
       GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
       This is free software: you are free  to  change  and  redistribute  it.
       There is NO WARRANTY, to the extent permitted by law.

SEE ALSO
       Full documentation <https://www.gnu.org/software/coreutils/du>
       or available locally via: info '(coreutils) du invocation'

GNU coreutils 9.4                 April 2024                             DU(1)


man du 번역기 번역본

더보기

귀하 (1) 사용자 명령 (1)

이름
       DU- 추정 파일 공간 사용

개요
       [옵션] ... [파일] ...
       du [옵션] ...-파일 0- ~ from = f

설명
       파일 세트의 장치 사용량을 요약하고 직접 - 재귀 적으로 -
       ries.

긴 옵션에 대한 필수 주장은 짧은 옵션에 필수적입니다.
       도.

-0, -null
              Newline이 아닌 NUL로 각 출력 라인을 종료하십시오

-a, -모두
              디렉토리뿐만 아니라 모든 파일에 대한 기록을 작성하십시오

-apparent-size
              장치 사용보다는 명백한 크기를 인쇄합니다. AP-
              부모 크기는 일반적으로 더 작으며 구멍으로 인해 클 수 있습니다.
              ( 'sparse') 파일, 내부 조각화, 간접 블록 및
              좋아요

-B, -Block-size = size
              인쇄하기 전에 크기별로 규모 크기; 예를 들어, '-BM'인쇄
              1,048,576 바이트 단위의 크기; 아래 크기 형식을 참조하십시오

-B, -바이트
              '-apparent-size -Block-size = 1'에 해당합니다.

-c, --total
              총계를 생산하십시오

-d,--회의-아르그
              명령 줄에 나열된 Symlinks DeReference 전용 Symlinks

-d,--max-depth = n
              디렉토리 (또는 파일, all)에 대한 총계를 인쇄하는 경우
              명령 줄 인수보다 낮은 수준 이하입니다.
              --max-depth = 0은 -summarize와 동일합니다

-Files0-From = f
              NUL 용지 된 파일 이름의 장치 사용량을 요약하십시오.
              파일 f에서 fied; F 인 경우 표준 입력에서 이름을 읽으십시오.

-h-- 언어-아그 (-d)와 동등합니다.

-h,-인간 읽기 가능
              인간 읽기 가능한 형식의 인쇄 크기 (예 : 1k 234m 2g)

-인 오드
              블록 사용 대신 inode 사용 정보를 나열하십시오

-K like -Block-size = 1k

-L, -언론
              모든 상징적 링크를 피하십시오

-L,-카운트 링크
              하드 링크가있는 경우 크기를 여러 번 계산하십시오

-m like -Block-size = 1m

-p,--언어
              상징적 링크를 따르지 마십시오 (이것은 기본값입니다)

-s,-분리-디르
              디렉토리의 경우 하위 디렉토리 크기는 포함되지 않습니다

-Si는 -H를 좋아하지만 1000의 1000이 아닌 1000의 전력을 사용하십시오.

-s, -summarize
              각 인수에 대해 총 만 표시하십시오

-t, -threshold = size
              양수 또는 항목 인 경우 크기보다 작은 항목을 제외합니다
              음수이면 크기보다 큽니다

-디렉토리의 모든 파일을 마지막으로 수정 한 시간 표시 시간
              또는 그 하위 디렉토리 중 하나

-타임 = 단어
              수정 시간 대신 단어로 시간 표시 : Atime, Access,
              사용, ctime 또는 상태

-시간 스타일 = 스타일
              스타일을 사용하여 시간 표시 : 전체 ISO, Long-Iso, ISO,
              또는 +형식; 형식은 '날짜'에서처럼 해석됩니다.

-x, -exclude-from = 파일
              파일의 모든 패턴과 일치하는 파일을 제외하십시오

-exclude = 패턴
              패턴과 일치하는 파일을 제외합니다

-X,-파일-시스템
              다른 파일 시스템에서 디렉토리를 건너 뜁니다

-헬프이 도움말과 종료를 표시합니다

--버전
              출력 버전 정보 및 종료

디스플레이 값은 첫 번째 사용 가능한 크기의 단위입니다.
       -Block-size 및 du_block_size, block_size 및 blocksize Environ-
       변수.   그렇지 않으면 단위 기본값 1024 바이트 (또는 512 인 경우
       posixly_correct가 설정되었습니다).

크기 인수는 정수 및 선택적 단위입니다 (예 : 10K는 IS
       10*1024).   단위는 k, m, g, t, p, e, z, y, q, q (1024의 전력) 또는 kb, mb, ...
       (1000의 힘).  이진 접두사도 사용할 수 있습니다 : kib = k, mib = m 및
       곧.

패턴
       패턴은 쉘 패턴입니다 (정규 표현이 아님).  패턴?
       *는 모든 문자와 일치하지만 *는 모든 문자열과 일치합니다 (
       0, 하나 또는 여러 문자).  예를 들어, *.o는 일치합니다
       이름이 .o로 끝나는 파일.  따라서 명령

du- exclude = '*.

.o로 끝나는 모든 파일 및 하위 디렉토리를 건너 뜁니다 (파일 포함
       .o 자체).

작가
       Torbjorn Granlund, David Mackenzie, Paul Eggert 및 Jim 작성
       메이어링.

보고 버그
       GNU Coreutils 온라인 도움말 : <https://www.gnu.org/software/coreutils/>
       번역 버그를 <https://translationproject.org/team/>에보고하십시오

저작권
       저작권 © 2023 Free Software Foundation, Inc. 라이센스 GPLV3+: GNU
       GPL 버전 3 이상 <https://gnu.org/licenses/gpl.html>.
       이것은 무료 소프트웨어입니다. 자유롭게 변경하고 재분배 할 수 있습니다.
       법률에 의해 허용되는 범위 내에서 보증은 없습니다.

참조하십시오
       전체 문서 <https://www.gnu.org/software/coreutils/du>
       또는 Info '(Coreutils) du Invocation을 통해 로컬로 사용 가능

GNU Coreutils 2024 년 4 월 9.4 일 du (1)

 

형태 : du [옵션] [파일]

기능 : [파일]의 저장소 사용량을 byte 단위로 출력한다.

[디렉토리]일 경우 내부에 들어있는 모든 파일을 대상을 개별사용량에 대해 byte단위로 출력한다.