Linux命令之du
du [选项] [文件]
以递归方式为目录汇总每个文件的磁盘使用情况。
(1).常用选项
-a,--all 显示对所有文件和目录的统计,而不是只包含子目录 --apparent-size 显示文件或目录自身大小,而不是它们占用磁盘空间的大小。文件或目录占用磁盘空间的大小与它们自身大小有时候并非完全一致。 -B,--block-size=SIZE 打印前按SIZE缩放大小。例如’-BM’以1048576字节为单位打印。 -b,--bytes 等同于--apparent-size --block-size=1 -d,--max-depth=N 仅输出小于等于N层的目录的总计。--max-depth=0的作用等同与-s选 -h,--human-readable 显示人类易读格式(K,M,G…) -k 类似--block-size=1K -m 类似--block-size=1M -s,--summarize 仅显示总计 -X,--exclude-from=FILE 排除与FILE中任何模式匹配的文件
(2).实例
du默认显示目录的磁盘使用情况
[root@xuexi ~]# ls -l nginx-1.14.2/ 总用量 736 drwxr-xr-x. 6 1001 1001 4096 1月 11 14:30 auto -rw-r--r--. 1 1001 1001 288742 12月 4 22:52 CHANGES -rw-r--r--. 1 1001 1001 440121 12月 4 22:52 CHANGES.ru drwxr-xr-x. 2 1001 1001 168 1月 11 15:49 conf -rwxr-xr-x. 1 1001 1001 2502 12月 4 22:52 configure drwxr-xr-x. 4 1001 1001 72 1月 11 14:30 contrib drwxr-xr-x. 2 1001 1001 40 1月 11 14:30 html -rw-r--r--. 1 1001 1001 1397 12月 4 22:52 LICENSE -rw-r--r--. 1 root root 376 1月 11 15:50 Makefile drwxr-xr-x. 2 1001 1001 21 1月 11 14:30 man drwxr-xr-x. 3 root root 125 1月 11 15:53 objs -rw-r--r--. 1 1001 1001 49 12月 4 22:52 README drwxr-xr-x. 9 1001 1001 91 1月 11 14:30 src [root@xuexi ~]# du nginx-1.14.2/ //只显示目录 48 nginx-1.14.2/auto/cc 4 nginx-1.14.2/auto/lib/geoip 4 nginx-1.14.2/auto/lib/google-perftools 8 nginx-1.14.2/auto/lib/libatomic 4 nginx-1.14.2/auto/lib/libgd 4 nginx-1.14.2/auto/lib/libxslt 20 nginx-1.14.2/auto/lib/openssl 24 nginx-1.14.2/auto/lib/pcre 8 nginx-1.14.2/auto/lib/perl 20 nginx-1.14.2/auto/lib/zlib 104 nginx-1.14.2/auto/lib 28 nginx-1.14.2/auto/os 16 nginx-1.14.2/auto/types 388 nginx-1.14.2/auto 40 nginx-1.14.2/conf 20 nginx-1.14.2/contrib/unicode2nginx 4 nginx-1.14.2/contrib/vim/ftdetect 4 nginx-1.14.2/contrib/vim/ftplugin 4 nginx-1.14.2/contrib/vim/indent 124 nginx-1.14.2/contrib/vim/syntax 136 nginx-1.14.2/contrib/vim 164 nginx-1.14.2/contrib 884 nginx-1.14.2/src/core 120 nginx-1.14.2/src/event/modules 424 nginx-1.14.2/src/event 68 nginx-1.14.2/src/http/modules/perl 1692 nginx-1.14.2/src/http/modules 388 nginx-1.14.2/src/http/v2 3004 nginx-1.14.2/src/http 300 nginx-1.14.2/src/mail 8 nginx-1.14.2/src/misc 416 nginx-1.14.2/src/os/unix 416 nginx-1.14.2/src/os 536 nginx-1.14.2/src/stream 5572 nginx-1.14.2/src 8 nginx-1.14.2/html 8 nginx-1.14.2/man 0 nginx-1.14.2/objs/src/core 0 nginx-1.14.2/objs/src/event/modules 0 nginx-1.14.2/objs/src/event 0 nginx-1.14.2/objs/src/os/unix 0 nginx-1.14.2/objs/src/os/win32 0 nginx-1.14.2/objs/src/os 0 nginx-1.14.2/objs/src/http/v2 0 nginx-1.14.2/objs/src/http/modules/perl 0 nginx-1.14.2/objs/src/http/modules 0 nginx-1.14.2/objs/src/http 0 nginx-1.14.2/objs/src/mail 0 nginx-1.14.2/objs/src/stream 0 nginx-1.14.2/objs/src/misc 0 nginx-1.14.2/objs/src 80 nginx-1.14.2/objs 6992 nginx-1.14.2/
显示所有文件和目录的统计
[root@xuexi ~]# du -a nginx-1.14.2/ 4 nginx-1.14.2/auto/cc/acc 4 nginx-1.14.2/auto/cc/bcc 4 nginx-1.14.2/auto/cc/ccc 4 nginx-1.14.2/auto/cc/clang 8 nginx-1.14.2/auto/cc/conf 4 nginx-1.14.2/auto/cc/gcc 4 nginx-1.14.2/auto/cc/icc 4 nginx-1.14.2/auto/cc/msvc 4 nginx-1.14.2/auto/cc/name 4 nginx-1.14.2/auto/cc/owc 4 nginx-1.14.2/auto/cc/sunc 48 nginx-1.14.2/auto/cc 4 nginx-1.14.2/auto/define 4 nginx-1.14.2/auto/endianness 4 nginx-1.14.2/auto/feature 4 nginx-1.14.2/auto/have 4 nginx-1.14.2/auto/have_headers 4 nginx-1.14.2/auto/headers 4 nginx-1.14.2/auto/include 4 nginx-1.14.2/auto/init 8 nginx-1.14.2/auto/install 4 nginx-1.14.2/auto/lib/conf 4 nginx-1.14.2/auto/lib/geoip/conf 4 nginx-1.14.2/auto/lib/geoip 4 nginx-1.14.2/auto/lib/google-perftools/conf 4 nginx-1.14.2/auto/lib/google-perftools 4 nginx-1.14.2/auto/lib/libatomic/conf 4 nginx-1.14.2/auto/lib/libatomic/make 8 nginx-1.14.2/auto/lib/libatomic 4 nginx-1.14.2/auto/lib/libgd/conf 4 nginx-1.14.2/auto/lib/libgd 4 nginx-1.14.2/auto/lib/libxslt/conf 4 nginx-1.14.2/auto/lib/libxslt 4 nginx-1.14.2/auto/lib/make 8 nginx-1.14.2/auto/lib/openssl/conf 4 nginx-1.14.2/auto/lib/openssl/make 4 nginx-1.14.2/auto/lib/openssl/makefile.bcc 4 nginx-1.14.2/auto/lib/openssl/makefile.msvc 20 nginx-1.14.2/auto/lib/openssl 8 nginx-1.14.2/auto/lib/pcre/conf 4 nginx-1.14.2/auto/lib/pcre/make 4 nginx-1.14.2/auto/lib/pcre/makefile.bcc 4 nginx-1.14.2/auto/lib/pcre/makefile.msvc 4 nginx-1.14.2/auto/lib/pcre/makefile.owc 24 nginx-1.14.2/auto/lib/pcre 4 nginx-1.14.2/auto/lib/perl/conf 4 nginx-1.14.2/auto/lib/perl/make 8 nginx-1.14.2/auto/lib/perl 4 nginx-1.14.2/auto/lib/zlib/conf 4 nginx-1.14.2/auto/lib/zlib/make 4 nginx-1.14.2/auto/lib/zlib/makefile.bcc 4 nginx-1.14.2/auto/lib/zlib/makefile.msvc 4 nginx-1.14.2/auto/lib/zlib/makefile.owc 20 nginx-1.14.2/auto/lib/zlib 104 nginx-1.14.2/auto/lib 20 nginx-1.14.2/auto/make 4 nginx-1.14.2/auto/module 40 nginx-1.14.2/auto/modules 4 nginx-1.14.2/auto/nohave 28 nginx-1.14.2/auto/options 4 nginx-1.14.2/auto/os/conf 4 nginx-1.14.2/auto/os/darwin 4 nginx-1.14.2/auto/os/freebsd 8 nginx-1.14.2/auto/os/linux 4 nginx-1.14.2/auto/os/solaris 4 nginx-1.14.2/auto/os/win32 28 nginx-1.14.2/auto/os 12 nginx-1.14.2/auto/sources 4 nginx-1.14.2/auto/stubs 4 nginx-1.14.2/auto/summary 4 nginx-1.14.2/auto/threads 4 nginx-1.14.2/auto/types/sizeof 4 nginx-1.14.2/auto/types/typedef 4 nginx-1.14.2/auto/types/uintptr_t 4 nginx-1.14.2/auto/types/value 16 nginx-1.14.2/auto/types 28 nginx-1.14.2/auto/unix 388 nginx-1.14.2/auto 4 nginx-1.14.2/conf/fastcgi.conf 4 nginx-1.14.2/conf/fastcgi_params 4 nginx-1.14.2/conf/koi-utf 4 nginx-1.14.2/conf/koi-win 8 nginx-1.14.2/conf/mime.types 4 nginx-1.14.2/conf/nginx.conf 4 nginx-1.14.2/conf/scgi_params 4 nginx-1.14.2/conf/uwsgi_params 4 nginx-1.14.2/conf/win-utf 40 nginx-1.14.2/conf 4 nginx-1.14.2/contrib/README 4 nginx-1.14.2/contrib/geo2nginx.pl 8 nginx-1.14.2/contrib/unicode2nginx/koi-utf 4 nginx-1.14.2/contrib/unicode2nginx/unicode-to-nginx.pl 8 nginx-1.14.2/contrib/unicode2nginx/win-utf 20 nginx-1.14.2/contrib/unicode2nginx 4 nginx-1.14.2/contrib/vim/ftdetect/nginx.vim 4 nginx-1.14.2/contrib/vim/ftdetect 4 nginx-1.14.2/contrib/vim/ftplugin/nginx.vim 4 nginx-1.14.2/contrib/vim/ftplugin 4 nginx-1.14.2/contrib/vim/indent/nginx.vim 4 nginx-1.14.2/contrib/vim/indent 124 nginx-1.14.2/contrib/vim/syntax/nginx.vim 124 nginx-1.14.2/contrib/vim/syntax 136 nginx-1.14.2/contrib/vim 164 nginx-1.14.2/contrib 40 nginx-1.14.2/src/core/nginx.c 4 nginx-1.14.2/src/core/nginx.h 4 nginx-1.14.2/src/core/ngx_array.c 4 nginx-1.14.2/src/core/ngx_array.h 8 nginx-1.14.2/src/core/ngx_buf.c 8 nginx-1.14.2/src/core/ngx_buf.h 36 nginx-1.14.2/src/core/ngx_conf_file.c 12 nginx-1.14.2/src/core/ngx_conf_file.h 4 nginx-1.14.2/src/core/ngx_config.h 40 nginx-1.14.2/src/core/ngx_connection.c 8 nginx-1.14.2/src/core/ngx_connection.h 4 nginx-1.14.2/src/core/ngx_core.h 4 nginx-1.14.2/src/core/ngx_cpuinfo.c 4 nginx-1.14.2/src/core/ngx_crc.h 8 nginx-1.14.2/src/core/ngx_crc32.c 4 nginx-1.14.2/src/core/ngx_crc32.h 8 nginx-1.14.2/src/core/ngx_crypt.c 4 nginx-1.14.2/src/core/ngx_crypt.h 36 nginx-1.14.2/src/core/ngx_cycle.c 8 nginx-1.14.2/src/core/ngx_cycle.h 28 nginx-1.14.2/src/core/ngx_file.c 8 nginx-1.14.2/src/core/ngx_file.h 24 nginx-1.14.2/src/core/ngx_hash.c 4 nginx-1.14.2/src/core/ngx_hash.h 32 nginx-1.14.2/src/core/ngx_inet.c 4 nginx-1.14.2/src/core/ngx_inet.h 4 nginx-1.14.2/src/core/ngx_list.c 4 nginx-1.14.2/src/core/ngx_list.h 20 nginx-1.14.2/src/core/ngx_log.c 12 nginx-1.14.2/src/core/ngx_log.h 12 nginx-1.14.2/src/core/ngx_md5.c 4 nginx-1.14.2/src/core/ngx_md5.h 12 nginx-1.14.2/src/core/ngx_module.c 8 nginx-1.14.2/src/core/ngx_module.h 4 nginx-1.14.2/src/core/ngx_murmurhash.c 4 nginx-1.14.2/src/core/ngx_murmurhash.h 32 nginx-1.14.2/src/core/ngx_open_file_cache.c 4 nginx-1.14.2/src/core/ngx_open_file_cache.h 20 nginx-1.14.2/src/core/ngx_output_chain.c 12 nginx-1.14.2/src/core/ngx_palloc.c 4 nginx-1.14.2/src/core/ngx_palloc.h 8 nginx-1.14.2/src/core/ngx_parse.c 4 nginx-1.14.2/src/core/ngx_parse.h 8 nginx-1.14.2/src/core/ngx_parse_time.c 4 nginx-1.14.2/src/core/ngx_queue.c 4 nginx-1.14.2/src/core/ngx_parse_time.h 12 nginx-1.14.2/src/core/ngx_proxy_protocol.c 4 nginx-1.14.2/src/core/ngx_proxy_protocol.h 4 nginx-1.14.2/src/core/ngx_queue.h 12 nginx-1.14.2/src/core/ngx_radix_tree.c 4 nginx-1.14.2/src/core/ngx_radix_tree.h 12 nginx-1.14.2/src/core/ngx_rbtree.c 4 nginx-1.14.2/src/core/ngx_rbtree.h 12 nginx-1.14.2/src/core/ngx_regex.c 4 nginx-1.14.2/src/core/ngx_regex.h 104 nginx-1.14.2/src/core/ngx_resolver.c 8 nginx-1.14.2/src/core/ngx_resolver.h 4 nginx-1.14.2/src/core/ngx_rwlock.c 4 nginx-1.14.2/src/core/ngx_rwlock.h 12 nginx-1.14.2/src/core/ngx_sha1.c 4 nginx-1.14.2/src/core/ngx_sha1.h 8 nginx-1.14.2/src/core/ngx_shmtx.c 4 nginx-1.14.2/src/core/ngx_shmtx.h 20 nginx-1.14.2/src/core/ngx_slab.c 4 nginx-1.14.2/src/core/ngx_slab.h 4 nginx-1.14.2/src/core/ngx_spinlock.c 44 nginx-1.14.2/src/core/ngx_string.c 8 nginx-1.14.2/src/core/ngx_string.h 12 nginx-1.14.2/src/core/ngx_syslog.c 4 nginx-1.14.2/src/core/ngx_syslog.h 16 nginx-1.14.2/src/core/ngx_thread_pool.c 4 nginx-1.14.2/src/core/ngx_thread_pool.h 12 nginx-1.14.2/src/core/ngx_times.c 4 nginx-1.14.2/src/core/ngx_times.h 884 nginx-1.14.2/src/core 16 nginx-1.14.2/src/event/modules/ngx_devpoll_module.c 28 nginx-1.14.2/src/event/modules/ngx_epoll_module.c 20 nginx-1.14.2/src/event/modules/ngx_eventport_module.c 20 nginx-1.14.2/src/event/modules/ngx_kqueue_module.c 12 nginx-1.14.2/src/event/modules/ngx_poll_module.c 12 nginx-1.14.2/src/event/modules/ngx_select_module.c 12 nginx-1.14.2/src/event/modules/ngx_win32_select_module.c 120 nginx-1.14.2/src/event/modules 32 nginx-1.14.2/src/event/ngx_event.c 16 nginx-1.14.2/src/event/ngx_event.h 24 nginx-1.14.2/src/event/ngx_event_accept.c 12 nginx-1.14.2/src/event/ngx_event_connect.c 4 nginx-1.14.2/src/event/ngx_event_connect.h 104 nginx-1.14.2/src/event/ngx_event_openssl.c 12 nginx-1.14.2/src/event/ngx_event_openssl.h 48 nginx-1.14.2/src/event/ngx_event_openssl_stapling.c 28 nginx-1.14.2/src/event/ngx_event_pipe.c 4 nginx-1.14.2/src/event/ngx_event_pipe.h 4 nginx-1.14.2/src/event/ngx_event_posted.c 4 nginx-1.14.2/src/event/ngx_event_posted.h 4 nginx-1.14.2/src/event/ngx_event_timer.c 4 nginx-1.14.2/src/event/ngx_event_timer.h 424 nginx-1.14.2/src/event 12 nginx-1.14.2/src/http/modules/ngx_http_access_module.c 8 nginx-1.14.2/src/http/modules/ngx_http_addition_filter_module.c 12 nginx-1.14.2/src/http/modules/ngx_http_auth_basic_module.c 12 nginx-1.14.2/src/http/modules/ngx_http_auth_request_module.c 32 nginx-1.14.2/src/http/modules/ngx_http_autoindex_module.c 20 nginx-1.14.2/src/http/modules/ngx_http_browser_module.c 44 nginx-1.14.2/src/http/modules/ngx_http_charset_filter_module.c 12 nginx-1.14.2/src/http/modules/ngx_http_chunked_filter_module.c 32 nginx-1.14.2/src/http/modules/ngx_http_dav_module.c 8 nginx-1.14.2/src/http/modules/ngx_http_degradation_module.c 8 nginx-1.14.2/src/http/modules/ngx_http_empty_gif_module.c 108 nginx-1.14.2/src/http/modules/ngx_http_fastcgi_module.c 4 nginx-1.14.2/src/http/modules/perl/Makefile.PL 4 nginx-1.14.2/src/http/modules/perl/nginx.pm 24 nginx-1.14.2/src/http/modules/perl/nginx.xs 28 nginx-1.14.2/src/http/modules/perl/ngx_http_perl_module.c 4 nginx-1.14.2/src/http/modules/perl/ngx_http_perl_module.h 4 nginx-1.14.2/src/http/modules/perl/typemap 68 nginx-1.14.2/src/http/modules/perl 8 nginx-1.14.2/src/http/modules/ngx_http_flv_module.c 44 nginx-1.14.2/src/http/modules/ngx_http_geo_module.c 24 nginx-1.14.2/src/http/modules/ngx_http_geoip_module.c 132 nginx-1.14.2/src/http/modules/ngx_http_grpc_module.c 20 nginx-1.14.2/src/http/modules/ngx_http_gunzip_filter_module.c 32 nginx-1.14.2/src/http/modules/ngx_http_gzip_filter_module.c 12 nginx-1.14.2/src/http/modules/ngx_http_gzip_static_module.c 24 nginx-1.14.2/src/http/modules/ngx_http_headers_filter_module.c 44 nginx-1.14.2/src/http/modules/ngx_http_image_filter_module.c 16 nginx-1.14.2/src/http/modules/ngx_http_index_module.c 20 nginx-1.14.2/src/http/modules/ngx_http_limit_conn_module.c 28 nginx-1.14.2/src/http/modules/ngx_http_limit_req_module.c 52 nginx-1.14.2/src/http/modules/ngx_http_log_module.c 16 nginx-1.14.2/src/http/modules/ngx_http_map_module.c 24 nginx-1.14.2/src/http/modules/ngx_http_memcached_module.c 8 nginx-1.14.2/src/http/modules/ngx_http_mirror_module.c 104 nginx-1.14.2/src/http/modules/ngx_http_mp4_module.c 8 nginx-1.14.2/src/http/modules/ngx_http_not_modified_filter_module.c 124 nginx-1.14.2/src/http/modules/ngx_http_proxy_module.c 12 nginx-1.14.2/src/http/modules/ngx_http_random_index_module.c 28 nginx-1.14.2/src/http/modules/ngx_http_range_filter_module.c 16 nginx-1.14.2/src/http/modules/ngx_http_realip_module.c 20 nginx-1.14.2/src/http/modules/ngx_http_referer_module.c 28 nginx-1.14.2/src/http/modules/ngx_http_rewrite_module.c 60 nginx-1.14.2/src/http/modules/ngx_http_scgi_module.c 12 nginx-1.14.2/src/http/modules/ngx_http_secure_link_module.c 16 nginx-1.14.2/src/http/modules/ngx_http_slice_filter_module.c 8 nginx-1.14.2/src/http/modules/ngx_http_split_clients_module.c 80 nginx-1.14.2/src/http/modules/ngx_http_ssi_filter_module.c 4 nginx-1.14.2/src/http/modules/ngx_http_ssi_filter_module.h 32 nginx-1.14.2/src/http/modules/ngx_http_ssl_module.c 4 nginx-1.14.2/src/http/modules/ngx_http_ssl_module.h 8 nginx-1.14.2/src/http/modules/ngx_http_static_module.c 8 nginx-1.14.2/src/http/modules/ngx_http_stub_status_module.c 28 nginx-1.14.2/src/http/modules/ngx_http_sub_filter_module.c 12 nginx-1.14.2/src/http/modules/ngx_http_try_files_module.c 20 nginx-1.14.2/src/http/modules/ngx_http_upstream_hash_module.c 8 nginx-1.14.2/src/http/modules/ngx_http_upstream_ip_hash_module.c 16 nginx-1.14.2/src/http/modules/ngx_http_upstream_keepalive_module.c 12 nginx-1.14.2/src/http/modules/ngx_http_upstream_zone_module.c 12 nginx-1.14.2/src/http/modules/ngx_http_upstream_least_conn_module.c 24 nginx-1.14.2/src/http/modules/ngx_http_userid_filter_module.c 72 nginx-1.14.2/src/http/modules/ngx_http_uwsgi_module.c 32 nginx-1.14.2/src/http/modules/ngx_http_xslt_filter_module.c 1692 nginx-1.14.2/src/http/modules 52 nginx-1.14.2/src/http/ngx_http.c 8 nginx-1.14.2/src/http/ngx_http.h 8 nginx-1.14.2/src/http/ngx_http_cache.h 4 nginx-1.14.2/src/http/ngx_http_config.h 12 nginx-1.14.2/src/http/ngx_http_copy_filter_module.c 140 nginx-1.14.2/src/http/ngx_http_core_module.c 20 nginx-1.14.2/src/http/ngx_http_core_module.h 68 nginx-1.14.2/src/http/ngx_http_file_cache.c 20 nginx-1.14.2/src/http/ngx_http_header_filter_module.c 60 nginx-1.14.2/src/http/ngx_http_parse.c 8 nginx-1.14.2/src/http/ngx_http_postpone_filter_module.c 92 nginx-1.14.2/src/http/ngx_http_request.c 24 nginx-1.14.2/src/http/ngx_http_request.h 32 nginx-1.14.2/src/http/ngx_http_request_body.c 44 nginx-1.14.2/src/http/ngx_http_script.c 132 nginx-1.14.2/src/http/v2/ngx_http_v2.c 16 nginx-1.14.2/src/http/v2/ngx_http_v2.h 4 nginx-1.14.2/src/http/v2/ngx_http_v2_encode.c 56 nginx-1.14.2/src/http/v2/ngx_http_v2_filter_module.c 128 nginx-1.14.2/src/http/v2/ngx_http_v2_huff_decode.c 16 nginx-1.14.2/src/http/v2/ngx_http_v2_huff_encode.c 20 nginx-1.14.2/src/http/v2/ngx_http_v2_module.c 4 nginx-1.14.2/src/http/v2/ngx_http_v2_module.h 12 nginx-1.14.2/src/http/v2/ngx_http_v2_table.c 388 nginx-1.14.2/src/http/v2 8 nginx-1.14.2/src/http/ngx_http_script.h 24 nginx-1.14.2/src/http/ngx_http_special_response.c 164 nginx-1.14.2/src/http/ngx_http_upstream.c 16 nginx-1.14.2/src/http/ngx_http_upstream.h 24 nginx-1.14.2/src/http/ngx_http_upstream_round_robin.c 8 nginx-1.14.2/src/http/ngx_http_upstream_round_robin.h 68 nginx-1.14.2/src/http/ngx_http_variables.c 4 nginx-1.14.2/src/http/ngx_http_variables.h 12 nginx-1.14.2/src/http/ngx_http_write_filter_module.c 3004 nginx-1.14.2/src/http 16 nginx-1.14.2/src/mail/ngx_mail.c 12 nginx-1.14.2/src/mail/ngx_mail.h 48 nginx-1.14.2/src/mail/ngx_mail_auth_http_module.c 20 nginx-1.14.2/src/mail/ngx_mail_core_module.c 24 nginx-1.14.2/src/mail/ngx_mail_handler.c 12 nginx-1.14.2/src/mail/ngx_mail_imap_handler.c 8 nginx-1.14.2/src/mail/ngx_mail_imap_module.c 4 nginx-1.14.2/src/mail/ngx_mail_imap_module.h 28 nginx-1.14.2/src/mail/ngx_mail_parse.c 12 nginx-1.14.2/src/mail/ngx_mail_pop3_handler.c 12 nginx-1.14.2/src/mail/ngx_mail_pop3_module.c 4 nginx-1.14.2/src/mail/ngx_mail_pop3_module.h 32 nginx-1.14.2/src/mail/ngx_mail_proxy_module.c 24 nginx-1.14.2/src/mail/ngx_mail_smtp_handler.c 12 nginx-1.14.2/src/mail/ngx_mail_smtp_module.c 4 nginx-1.14.2/src/mail/ngx_mail_smtp_module.h 20 nginx-1.14.2/src/mail/ngx_mail_ssl_module.c 4 nginx-1.14.2/src/mail/ngx_mail_ssl_module.h 300 nginx-1.14.2/src/mail 4 nginx-1.14.2/src/misc/ngx_cpp_test_module.cpp 4 nginx-1.14.2/src/misc/ngx_google_perftools_module.c 8 nginx-1.14.2/src/misc 4 nginx-1.14.2/src/os/unix/ngx_alloc.c 4 nginx-1.14.2/src/os/unix/ngx_alloc.h 8 nginx-1.14.2/src/os/unix/ngx_atomic.h 8 nginx-1.14.2/src/os/unix/ngx_channel.c 4 nginx-1.14.2/src/os/unix/ngx_channel.h 4 nginx-1.14.2/src/os/unix/ngx_daemon.c 4 nginx-1.14.2/src/os/unix/ngx_darwin.h 4 nginx-1.14.2/src/os/unix/ngx_darwin_config.h 8 nginx-1.14.2/src/os/unix/ngx_darwin_init.c 8 nginx-1.14.2/src/os/unix/ngx_darwin_sendfile_chain.c 4 nginx-1.14.2/src/os/unix/ngx_dlopen.c 4 nginx-1.14.2/src/os/unix/ngx_dlopen.h 4 nginx-1.14.2/src/os/unix/ngx_errno.c 4 nginx-1.14.2/src/os/unix/ngx_errno.h 8 nginx-1.14.2/src/os/unix/ngx_file_aio_read.c 20 nginx-1.14.2/src/os/unix/ngx_files.c 12 nginx-1.14.2/src/os/unix/ngx_files.h 4 nginx-1.14.2/src/os/unix/ngx_freebsd.h 4 nginx-1.14.2/src/os/unix/ngx_freebsd_config.h 4 nginx-1.14.2/src/os/unix/ngx_linux.h 8 nginx-1.14.2/src/os/unix/ngx_freebsd_init.c 12 nginx-1.14.2/src/os/unix/ngx_freebsd_sendfile_chain.c 4 nginx-1.14.2/src/os/unix/ngx_gcc_atomic_amd64.h 8 nginx-1.14.2/src/os/unix/ngx_gcc_atomic_ppc.h 4 nginx-1.14.2/src/os/unix/ngx_gcc_atomic_sparc64.h 4 nginx-1.14.2/src/os/unix/ngx_gcc_atomic_x86.h 4 nginx-1.14.2/src/os/unix/ngx_linux_aio_read.c 4 nginx-1.14.2/src/os/unix/ngx_linux_config.h 4 nginx-1.14.2/src/os/unix/ngx_linux_init.c 12 nginx-1.14.2/src/os/unix/ngx_linux_sendfile_chain.c 4 nginx-1.14.2/src/os/unix/ngx_os.h 4 nginx-1.14.2/src/os/unix/ngx_posix_config.h 4 nginx-1.14.2/src/os/unix/ngx_posix_init.c 20 nginx-1.14.2/src/os/unix/ngx_process.c 4 nginx-1.14.2/src/os/unix/ngx_process.h 36 nginx-1.14.2/src/os/unix/ngx_process_cycle.c 4 nginx-1.14.2/src/os/unix/ngx_process_cycle.h 8 nginx-1.14.2/src/os/unix/ngx_readv_chain.c 4 nginx-1.14.2/src/os/unix/ngx_recv.c 4 nginx-1.14.2/src/os/unix/ngx_send.c 4 nginx-1.14.2/src/os/unix/ngx_setaffinity.c 4 nginx-1.14.2/src/os/unix/ngx_setaffinity.h 4 nginx-1.14.2/src/os/unix/ngx_setproctitle.c 4 nginx-1.14.2/src/os/unix/ngx_setproctitle.h 4 nginx-1.14.2/src/os/unix/ngx_shmem.c 4 nginx-1.14.2/src/os/unix/ngx_shmem.h 4 nginx-1.14.2/src/os/unix/ngx_socket.c 4 nginx-1.14.2/src/os/unix/ngx_socket.h 4 nginx-1.14.2/src/os/unix/ngx_solaris.h 4 nginx-1.14.2/src/os/unix/ngx_solaris_config.h 4 nginx-1.14.2/src/os/unix/ngx_solaris_init.c 8 nginx-1.14.2/src/os/unix/ngx_solaris_sendfilev_chain.c 4 nginx-1.14.2/src/os/unix/ngx_sunpro_amd64.il 4 nginx-1.14.2/src/os/unix/ngx_sunpro_atomic_sparc64.h 4 nginx-1.14.2/src/os/unix/ngx_sunpro_sparc64.il 4 nginx-1.14.2/src/os/unix/ngx_thread.h 4 nginx-1.14.2/src/os/unix/ngx_sunpro_x86.il 4 nginx-1.14.2/src/os/unix/ngx_thread_cond.c 4 nginx-1.14.2/src/os/unix/ngx_thread_id.c 8 nginx-1.14.2/src/os/unix/ngx_thread_mutex.c 4 nginx-1.14.2/src/os/unix/ngx_time.c 4 nginx-1.14.2/src/os/unix/ngx_time.h 4 nginx-1.14.2/src/os/unix/ngx_udp_recv.c 4 nginx-1.14.2/src/os/unix/ngx_udp_send.c 12 nginx-1.14.2/src/os/unix/ngx_udp_sendmsg_chain.c 4 nginx-1.14.2/src/os/unix/ngx_user.c 4 nginx-1.14.2/src/os/unix/ngx_user.h 8 nginx-1.14.2/src/os/unix/ngx_writev_chain.c 416 nginx-1.14.2/src/os/unix 416 nginx-1.14.2/src/os 20 nginx-1.14.2/src/stream/ngx_stream.c 12 nginx-1.14.2/src/stream/ngx_stream.h 12 nginx-1.14.2/src/stream/ngx_stream_access_module.c 24 nginx-1.14.2/src/stream/ngx_stream_core_module.c 44 nginx-1.14.2/src/stream/ngx_stream_geo_module.c 20 nginx-1.14.2/src/stream/ngx_stream_geoip_module.c 12 nginx-1.14.2/src/stream/ngx_stream_handler.c 20 nginx-1.14.2/src/stream/ngx_stream_limit_conn_module.c 44 nginx-1.14.2/src/stream/ngx_stream_log_module.c 16 nginx-1.14.2/src/stream/ngx_stream_map_module.c 60 nginx-1.14.2/src/stream/ngx_stream_proxy_module.c 12 nginx-1.14.2/src/stream/ngx_stream_realip_module.c 8 nginx-1.14.2/src/stream/ngx_stream_return_module.c 24 nginx-1.14.2/src/stream/ngx_stream_script.c 4 nginx-1.14.2/src/stream/ngx_stream_script.h 8 nginx-1.14.2/src/stream/ngx_stream_split_clients_module.c 28 nginx-1.14.2/src/stream/ngx_stream_ssl_module.c 4 nginx-1.14.2/src/stream/ngx_stream_ssl_module.h 16 nginx-1.14.2/src/stream/ngx_stream_ssl_preread_module.c 20 nginx-1.14.2/src/stream/ngx_stream_upstream.c 8 nginx-1.14.2/src/stream/ngx_stream_upstream.h 20 nginx-1.14.2/src/stream/ngx_stream_upstream_hash_module.c 8 nginx-1.14.2/src/stream/ngx_stream_upstream_least_conn_module.c 24 nginx-1.14.2/src/stream/ngx_stream_upstream_round_robin.c 8 nginx-1.14.2/src/stream/ngx_stream_upstream_round_robin.h 12 nginx-1.14.2/src/stream/ngx_stream_upstream_zone_module.c 32 nginx-1.14.2/src/stream/ngx_stream_variables.c 4 nginx-1.14.2/src/stream/ngx_stream_variables.h 8 nginx-1.14.2/src/stream/ngx_stream_write_filter_module.c 536 nginx-1.14.2/src/stream 5572 nginx-1.14.2/src 4 nginx-1.14.2/configure 4 nginx-1.14.2/LICENSE 4 nginx-1.14.2/README 4 nginx-1.14.2/html/50x.html 4 nginx-1.14.2/html/index.html 8 nginx-1.14.2/html 8 nginx-1.14.2/man/nginx.8 8 nginx-1.14.2/man 432 nginx-1.14.2/CHANGES.ru 284 nginx-1.14.2/CHANGES 4 nginx-1.14.2/Makefile 4 nginx-1.14.2/objs/ngx_auto_headers.h 20 nginx-1.14.2/objs/autoconf.err 8 nginx-1.14.2/objs/ngx_auto_config.h 8 nginx-1.14.2/objs/ngx_modules.c 0 nginx-1.14.2/objs/src/core 0 nginx-1.14.2/objs/src/event/modules 0 nginx-1.14.2/objs/src/event 0 nginx-1.14.2/objs/src/os/unix 0 nginx-1.14.2/objs/src/os/win32 0 nginx-1.14.2/objs/src/os 0 nginx-1.14.2/objs/src/http/v2 0 nginx-1.14.2/objs/src/http/modules/perl 0 nginx-1.14.2/objs/src/http/modules 0 nginx-1.14.2/objs/src/http 0 nginx-1.14.2/objs/src/mail 0 nginx-1.14.2/objs/src/stream 0 nginx-1.14.2/objs/src/misc 0 nginx-1.14.2/objs/src 40 nginx-1.14.2/objs/Makefile 80 nginx-1.14.2/objs 6992 nginx-1.14.2/
以易读方式显示总计目录结果
[root@xuexi ~]# du -sh nginx-1.14.2/ 6.9M nginx-1.14.2/
指定目录层级显示
[root@xuexi ~]# du -d 1 nginx-1.14.2/ //显示小于等于1的目录层级 388 nginx-1.14.2/auto 40 nginx-1.14.2/conf 164 nginx-1.14.2/contrib 5572 nginx-1.14.2/src 8 nginx-1.14.2/html 8 nginx-1.14.2/man 80 nginx-1.14.2/objs 6992 nginx-1.14.2/ [root@xuexi ~]# du -d 2 nginx-1.14.2/ //显示小于等于2的目录层级 48 nginx-1.14.2/auto/cc 104 nginx-1.14.2/auto/lib 28 nginx-1.14.2/auto/os 16 nginx-1.14.2/auto/types 388 nginx-1.14.2/auto 40 nginx-1.14.2/conf 20 nginx-1.14.2/contrib/unicode2nginx 136 nginx-1.14.2/contrib/vim 164 nginx-1.14.2/contrib 884 nginx-1.14.2/src/core 424 nginx-1.14.2/src/event 3004 nginx-1.14.2/src/http 300 nginx-1.14.2/src/mail 8 nginx-1.14.2/src/misc 416 nginx-1.14.2/src/os 536 nginx-1.14.2/src/stream 5572 nginx-1.14.2/src 8 nginx-1.14.2/html 8 nginx-1.14.2/man 0 nginx-1.14.2/objs/src 80 nginx-1.14.2/objs 6992 nginx-1.14.2/