Linux - du (Disk Usage)
Syntax
du [OPTION]... [FILE]...
du [OPTION]... --files0-from=F
SAMPLE>>>>
[irteamsu@cdb021.imgr kafka-logs]$ du -sch 2018*
4.0K 20180411-0
4.0K 20180412-0
8.0K 20180413-0
4.0K 20180414-0
4.0K 20180415-0
4.0K 20180416-0
4.0K 20180417-0
838M 20180418-0
8.0K 20180419-0
6.7G 20180420-0
1.1M 20180421-0
1.2M 20180422-0
17G 20180423-0
18G 20180424-0
18G 20180425-0
18G 20180426-0
18G 20180427-0
1.2M 20180428-0
1.1M 20180429-0
17G 20180430-0
0 20180431-0
1.1M 20180501-0
18G 20180502-0
17G 20180503-0
13G 20180504-0
3.1 - Options
3.1.1 - Data Filtering
-a, –all: get info for all files, not just directories
--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
-X FILE, --exclude-from=FILE: Exclude files that match any pattern in FILE.
--exclude=PATTERN Exclude files that match PATTERN.
3.1.2 - Summarize
-s, --summarize display only a total for each argument
-c, --total: produce a grand total
3.1.3 - Calculation
-S, --separate-dirs do not include size of subdirectories
--apparent-size: print apparent sizes, rather than disk usage; although the apparent size is usually smaller, it may be larger due to holes in (“sparse”) files, internal fragmentation, indirect blocks, and the like
3.1.4 - Symlink
-l, --count-links: show sizes many times if hard linked
-L, --dereference: dereference all symbolic links
-P, --no-dereference: don’t follow any symbolic links (this is the default)
3.1.5 - Formatting
3.1.5.1 - Time
--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 STYLE:
full-iso,
long-iso,
iso,
+FORMAT FORMAT is interpreted like ‘date’
3.1.5.2 - Newline
-0, --null: end each output line with 0 byte rather than newline
3.1.5.3 - Size
-h, --human-readable: print sizes in human readable format (e.g., 1K 234M 2G)
--si like -h, but use powers of 1000 not 1024
--block-size=SIZE: display the size as a multiple of SIZE. Shortcut
-b: bit --block-size=SIZE
-k: --block-size=1k
-m: --block-size=1M
'리눅스' 카테고리의 다른 글
BIOS 부트 모드(Boot Mode)에 따른 CentOS설치시 추가 파티션 설정(/boot/efi) (0) | 2021.03.31 |
---|---|
CentOS 6. 설치가이드(파티션설정) (0) | 2021.03.30 |
LINUX,REDIS 활용 (0) | 2019.10.30 |
#find ./ -type f -mtime -일수 -ls (0) | 2019.10.30 |
리눅스 파티션 수동설치(CentOS 6.6) (0) | 2019.10.29 |