head 1.24; access; symbols netbsd-11-0-RC4:1.24 netbsd-11-0-RC3:1.24 netbsd-11-0-RC2:1.24 netbsd-11-0-RC1:1.24 perseant-exfatfs-base-20250801:1.24 netbsd-11:1.24.0.12 netbsd-11-base:1.24 netbsd-10-1-RELEASE:1.24 perseant-exfatfs-base-20240630:1.24 perseant-exfatfs:1.24.0.10 perseant-exfatfs-base:1.24 netbsd-8-3-RELEASE:1.23 netbsd-9-4-RELEASE:1.23.34.1 netbsd-10-0-RELEASE:1.24 netbsd-10-0-RC6:1.24 netbsd-10-0-RC5:1.24 netbsd-10-0-RC4:1.24 netbsd-10-0-RC3:1.24 netbsd-10-0-RC2:1.24 netbsd-10-0-RC1:1.24 netbsd-10:1.24.0.8 netbsd-10-base:1.24 netbsd-9-3-RELEASE:1.23.34.1 cjep_sun2x-base1:1.24 cjep_sun2x:1.24.0.6 cjep_sun2x-base:1.24 cjep_staticlib_x-base1:1.24 netbsd-9-2-RELEASE:1.23.34.1 cjep_staticlib_x:1.24.0.4 cjep_staticlib_x-base:1.24 netbsd-9-1-RELEASE:1.23.34.1 phil-wifi-20200421:1.24 phil-wifi-20200411:1.24 is-mlppp:1.24.0.2 is-mlppp-base:1.24 phil-wifi-20200406:1.24 netbsd-8-2-RELEASE:1.23 netbsd-9-0-RELEASE:1.23.34.1 netbsd-9-0-RC2:1.23.34.1 netbsd-9-0-RC1:1.23.34.1 phil-wifi-20191119:1.24 netbsd-9:1.23.0.34 netbsd-9-base:1.23 phil-wifi-20190609:1.23 netbsd-8-1-RELEASE:1.23 netbsd-8-1-RC1:1.23 pgoyette-compat-merge-20190127:1.23 pgoyette-compat-20190127:1.23 pgoyette-compat-20190118:1.23 pgoyette-compat-1226:1.23 pgoyette-compat-1126:1.23 pgoyette-compat-1020:1.23 pgoyette-compat-0930:1.23 pgoyette-compat-0906:1.23 netbsd-7-2-RELEASE:1.23 pgoyette-compat-0728:1.23 netbsd-8-0-RELEASE:1.23 phil-wifi:1.23.0.32 phil-wifi-base:1.23 pgoyette-compat-0625:1.23 netbsd-8-0-RC2:1.23 pgoyette-compat-0521:1.23 pgoyette-compat-0502:1.23 pgoyette-compat-0422:1.23 netbsd-8-0-RC1:1.23 pgoyette-compat-0415:1.23 pgoyette-compat-0407:1.23 pgoyette-compat-0330:1.23 pgoyette-compat-0322:1.23 pgoyette-compat-0315:1.23 netbsd-7-1-2-RELEASE:1.23 pgoyette-compat:1.23.0.30 pgoyette-compat-base:1.23 netbsd-7-1-1-RELEASE:1.23 matt-nb8-mediatek:1.23.0.28 matt-nb8-mediatek-base:1.23 perseant-stdc-iso10646:1.23.0.26 perseant-stdc-iso10646-base:1.23 netbsd-8:1.23.0.24 netbsd-8-base:1.23 prg-localcount2-base3:1.23 prg-localcount2-base2:1.23 prg-localcount2-base1:1.23 prg-localcount2:1.23.0.22 prg-localcount2-base:1.23 pgoyette-localcount-20170426:1.23 bouyer-socketcan-base1:1.23 pgoyette-localcount-20170320:1.23 netbsd-7-1:1.23.0.20 netbsd-7-1-RELEASE:1.23 netbsd-7-1-RC2:1.23 netbsd-7-nhusb-base-20170116:1.23 bouyer-socketcan:1.23.0.18 bouyer-socketcan-base:1.23 pgoyette-localcount-20170107:1.23 netbsd-7-1-RC1:1.23 pgoyette-localcount-20161104:1.23 netbsd-7-0-2-RELEASE:1.23 localcount-20160914:1.23 netbsd-7-nhusb:1.23.0.16 netbsd-7-nhusb-base:1.23 pgoyette-localcount-20160806:1.23 pgoyette-localcount-20160726:1.23 pgoyette-localcount:1.23.0.14 pgoyette-localcount-base:1.23 netbsd-7-0-1-RELEASE:1.23 netbsd-7-0:1.23.0.12 netbsd-7-0-RELEASE:1.23 netbsd-7-0-RC3:1.23 netbsd-7-0-RC2:1.23 netbsd-7-0-RC1:1.23 netbsd-5-2-3-RELEASE:1.21 netbsd-5-1-5-RELEASE:1.21 netbsd-6-0-6-RELEASE:1.21 netbsd-6-1-5-RELEASE:1.21 netbsd-7:1.23.0.10 netbsd-7-base:1.23 yamt-pagecache-base9:1.23 yamt-pagecache-tag8:1.21.40.2 netbsd-6-1-4-RELEASE:1.21 netbsd-6-0-5-RELEASE:1.21 tls-earlyentropy:1.23.0.8 tls-earlyentropy-base:1.23 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.23 riastradh-drm2-base3:1.23 netbsd-6-1-3-RELEASE:1.21 netbsd-6-0-4-RELEASE:1.21 netbsd-5-2-2-RELEASE:1.21 netbsd-5-1-4-RELEASE:1.21 netbsd-6-1-2-RELEASE:1.21 netbsd-6-0-3-RELEASE:1.21 netbsd-5-2-1-RELEASE:1.21 netbsd-5-1-3-RELEASE:1.21 netbsd-6-1-1-RELEASE:1.21 riastradh-drm2-base2:1.23 riastradh-drm2-base1:1.23 riastradh-drm2:1.23.0.4 riastradh-drm2-base:1.23 netbsd-6-1:1.21.0.50 netbsd-6-0-2-RELEASE:1.21 netbsd-6-1-RELEASE:1.21 netbsd-6-1-RC4:1.21 netbsd-6-1-RC3:1.21 agc-symver:1.23.0.6 agc-symver-base:1.23 netbsd-6-1-RC2:1.21 netbsd-6-1-RC1:1.21 yamt-pagecache-base8:1.23 netbsd-5-2:1.21.0.48 netbsd-6-0-1-RELEASE:1.21 yamt-pagecache-base7:1.23 netbsd-5-2-RELEASE:1.21 netbsd-5-2-RC1:1.21 matt-nb6-plus-nbase:1.21 yamt-pagecache-base6:1.23 netbsd-6-0:1.21.0.46 netbsd-6-0-RELEASE:1.21 netbsd-6-0-RC2:1.21 tls-maxphys:1.23.0.2 tls-maxphys-base:1.23 matt-nb6-plus:1.21.0.44 matt-nb6-plus-base:1.21 netbsd-6-0-RC1:1.21 yamt-pagecache-base5:1.23 yamt-pagecache-base4:1.22 netbsd-6:1.21.0.42 netbsd-6-base:1.21 netbsd-5-1-2-RELEASE:1.21 netbsd-5-1-1-RELEASE:1.21 yamt-pagecache-base3:1.21 yamt-pagecache-base2:1.21 yamt-pagecache:1.21.0.40 yamt-pagecache-base:1.21 cherry-xenmp:1.21.0.38 cherry-xenmp-base:1.21 bouyer-quota2-nbase:1.21 bouyer-quota2:1.21.0.36 bouyer-quota2-base:1.21 matt-mips64-premerge-20101231:1.21 matt-nb5-mips64-premerge-20101231:1.21 matt-nb5-pq3:1.21.0.34 matt-nb5-pq3-base:1.21 netbsd-5-1:1.21.0.32 netbsd-5-1-RELEASE:1.21 netbsd-5-1-RC4:1.21 matt-nb5-mips64-k15:1.21 netbsd-5-1-RC3:1.21 netbsd-5-1-RC2:1.21 netbsd-5-1-RC1:1.21 netbsd-5-0-2-RELEASE:1.21 matt-nb5-mips64-premerge-20091211:1.21 matt-premerge-20091211:1.21 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.21 matt-nb4-mips64-k7-u2a-k9b:1.21 matt-nb5-mips64-u1-k1-k5:1.21 matt-nb5-mips64:1.21.0.30 netbsd-5-0-1-RELEASE:1.21 jym-xensuspend-nbase:1.21 netbsd-5-0:1.21.0.28 netbsd-5-0-RELEASE:1.21 netbsd-5-0-RC4:1.21 netbsd-5-0-RC3:1.21 netbsd-5-0-RC2:1.21 jym-xensuspend:1.21.0.26 jym-xensuspend-base:1.21 netbsd-5-0-RC1:1.21 netbsd-5:1.21.0.24 netbsd-5-base:1.21 matt-mips64-base2:1.21 matt-mips64:1.21.0.22 mjf-devfs2:1.21.0.20 mjf-devfs2-base:1.21 netbsd-4-0-1-RELEASE:1.21 wrstuden-revivesa-base-3:1.21 wrstuden-revivesa-base-2:1.21 wrstuden-fixsa-newbase:1.21 wrstuden-revivesa-base-1:1.21 yamt-pf42-base4:1.21 yamt-pf42-base3:1.21 hpcarm-cleanup-nbase:1.21 yamt-pf42-baseX:1.21 yamt-pf42-base2:1.21 wrstuden-revivesa:1.21.0.18 wrstuden-revivesa-base:1.21 yamt-pf42:1.21.0.16 yamt-pf42-base:1.21 keiichi-mipv6-nbase:1.21 keiichi-mipv6:1.21.0.14 keiichi-mipv6-base:1.21 matt-armv6-nbase:1.21 matt-armv6-prevmlocking:1.21 wrstuden-fixsa-base-1:1.21 netbsd-4-0:1.21.0.12 netbsd-4-0-RELEASE:1.21 cube-autoconf:1.21.0.10 cube-autoconf-base:1.21 netbsd-4-0-RC5:1.21 netbsd-4-0-RC4:1.21 netbsd-4-0-RC3:1.21 netbsd-4-0-RC2:1.21 netbsd-4-0-RC1:1.21 matt-armv6:1.21.0.8 matt-armv6-base:1.21 matt-mips64-base:1.21 hpcarm-cleanup:1.21.0.6 hpcarm-cleanup-base:1.21 netbsd-3-1-1-RELEASE:1.19 netbsd-3-0-3-RELEASE:1.19 wrstuden-fixsa:1.21.0.4 wrstuden-fixsa-base:1.21 abandoned-netbsd-4-base:1.19 abandoned-netbsd-4:1.19.0.8 netbsd-3-1:1.19.0.10 netbsd-3-1-RELEASE:1.19 netbsd-3-0-2-RELEASE:1.19 netbsd-3-1-RC4:1.19 netbsd-3-1-RC3:1.19 netbsd-3-1-RC2:1.19 netbsd-3-1-RC1:1.19 netbsd-4:1.21.0.2 netbsd-4-base:1.21 chap-midi-nbase:1.19 netbsd-3-0-1-RELEASE:1.19 chap-midi:1.19.0.6 chap-midi-base:1.19 netbsd-3-0:1.19.0.4 netbsd-3-0-RELEASE:1.19 netbsd-3-0-RC6:1.19 netbsd-3-0-RC5:1.19 netbsd-3-0-RC4:1.19 netbsd-3-0-RC3:1.19 netbsd-3-0-RC2:1.19 netbsd-3-0-RC1:1.19 netbsd-2-0-3-RELEASE:1.17.2.1 netbsd-2-1:1.17.2.1.0.4 netbsd-2-1-RELEASE:1.17.2.1 netbsd-2-1-RC6:1.17.2.1 netbsd-2-1-RC5:1.17.2.1 netbsd-2-1-RC4:1.17.2.1 netbsd-2-1-RC3:1.17.2.1 netbsd-2-1-RC2:1.17.2.1 netbsd-2-1-RC1:1.17.2.1 netbsd-2-0-2-RELEASE:1.17.2.1 netbsd-3:1.19.0.2 netbsd-3-base:1.19 netbsd-2-0-1-RELEASE:1.17.2.1 netbsd-2:1.17.2.1.0.2 netbsd-2-base:1.17.2.1 netbsd-2-0-RELEASE:1.17.2.1 netbsd-2-0-RC5:1.17.2.1 netbsd-2-0-RC4:1.17.2.1 netbsd-2-0-RC3:1.17.2.1 netbsd-2-0-RC2:1.17.2.1 netbsd-2-0-RC1:1.17.2.1 netbsd-2-0:1.17.0.2 netbsd-2-0-base:1.17 netbsd-1-6-PATCH002-RELEASE:1.12 netbsd-1-6-PATCH002:1.12 netbsd-1-6-PATCH002-RC4:1.12 netbsd-1-6-PATCH002-RC3:1.12 netbsd-1-6-PATCH002-RC2:1.12 netbsd-1-6-PATCH002-RC1:1.12 netbsd-1-6-PATCH001:1.12 netbsd-1-6-PATCH001-RELEASE:1.12 netbsd-1-6-PATCH001-RC3:1.12 netbsd-1-6-PATCH001-RC2:1.12 netbsd-1-6-PATCH001-RC1:1.12 fvdl_fs64_base:1.14 netbsd-1-6-RELEASE:1.12 netbsd-1-6-RC3:1.12 netbsd-1-6-RC2:1.12 netbsd-1-6-RC1:1.12 netbsd-1-6:1.12.0.2 netbsd-1-6-base:1.12 netbsd-1-5-PATCH003:1.8 netbsd-1-5-PATCH002:1.8 netbsd-1-5-PATCH001:1.8 netbsd-1-5-RELEASE:1.8 netbsd-1-5-BETA2:1.8 netbsd-1-5-BETA:1.8 netbsd-1-4-PATCH003:1.8 netbsd-1-5-ALPHA2:1.8 netbsd-1-5:1.8.0.10 netbsd-1-5-base:1.8 minoura-xpg4dl-base:1.8 minoura-xpg4dl:1.8.0.8 netbsd-1-4-PATCH002:1.8 wrstuden-devbsize-19991221:1.8 wrstuden-devbsize:1.8.0.6 wrstuden-devbsize-base:1.8 comdex-fall-1999:1.8.0.4 comdex-fall-1999-base:1.8 netbsd-1-4-PATCH001:1.8 netbsd-1-4-RELEASE:1.8 netbsd-1-4:1.8.0.2 netbsd-1-4-base:1.8 netbsd-1-3-PATCH003:1.7 netbsd-1-3-PATCH003-CANDIDATE2:1.7 netbsd-1-3-PATCH003-CANDIDATE1:1.7 netbsd-1-3-PATCH003-CANDIDATE0:1.7 netbsd-1-3-PATCH002:1.7 netbsd-1-3-PATCH001:1.7 netbsd-1-3-RELEASE:1.7 netbsd-1-3-BETA:1.7 netbsd-1-3:1.7.0.2 netbsd-1-3-base:1.7 netbsd-1-2-PATCH001:1.5 netbsd-1-2-RELEASE:1.5 netbsd-1-2-BETA:1.5 netbsd-1-2:1.5.0.4 netbsd-1-2-base:1.5 netbsd-1-1-PATCH001:1.4 netbsd-1-1-RELEASE:1.4 netbsd-1-1:1.4.0.2 netbsd-1-1-base:1.4 lite-2:1.1.1.2 lite-1:1.1.1.2 CSRG:1.1.1 netbsd-1-0-PATCH06:1.3 netbsd-1-0-PATCH05:1.3 netbsd-1-0-PATCH04:1.3 netbsd-1-0-PATCH03:1.3 netbsd-1-0-PATCH02:1.3 netbsd-1-0-PATCH1:1.3 netbsd-1-0-PATCH0:1.3 netbsd-1-0-RELEASE:1.3 netbsd-1-0:1.3.0.2 netbsd-1-0-base:1.3 netbsd-0-9-RELEASE:1.1.1.1 netbsd-0-9-BETA:1.1.1.1 netbsd-0-9-ALPHA2:1.1.1.1 netbsd-0-9-ALPHA:1.1.1.1 netbsd-0-9:1.1.1.1.0.2 netbsd-0-9-base:1.1.1.1 netbsd-0-8:1.1.1.1 netbsd-alpha-1:1.1.1.1 patchkit-0-2-2:1.1.1.1 WFJ-386bsd-01:1.1.1.1 WFJ-920714:1.1.1; locks; strict; comment @.\" @; 1.24 date 2019.09.01.18.18.42; author sevan; state Exp; branches; next 1.23; commitid y9fTPXyn7eXDZkBB; 1.23 date 2012.05.14.21.14.14; author wiz; state Exp; branches 1.23.32.1 1.23.34.1; next 1.22; 1.22 date 2012.03.11.11.23.20; author shattered; state Exp; branches; next 1.21; 1.21 date 2006.09.24.07.19.16; author wiz; state Exp; branches 1.21.40.1; next 1.20; 1.20 date 2006.09.23.23.20.20; author elad; state Exp; branches; next 1.19; 1.19 date 2004.05.17.15.36.17; author wiz; state Exp; branches; next 1.18; 1.18 date 2004.05.17.01.56.19; author simonb; state Exp; branches; next 1.17; 1.17 date 2003.08.07.11.13.34; author agc; state Exp; branches 1.17.2.1; next 1.16; 1.16 date 2003.04.18.13.16.50; author grant; state Exp; branches; next 1.15; 1.15 date 2003.04.18.13.09.22; author grant; state Exp; branches; next 1.14; 1.14 date 2002.09.27.07.18.16; author wiz; state Exp; branches; next 1.13; 1.13 date 2002.09.27.03.33.33; author provos; state Exp; branches; next 1.12; 1.12 date 2001.12.01.19.03.31; author wiz; state Exp; branches; next 1.11; 1.11 date 2001.12.01.16.43.12; author wiz; state Exp; branches; next 1.10; 1.10 date 2001.07.08.15.34.14; author simonb; state Exp; branches; next 1.9; 1.9 date 2000.12.30.16.00.33; author hubertf; state Exp; branches; next 1.8; 1.8 date 98.02.15.17.08.17; author kleink; state Exp; branches; next 1.7; 1.7 date 97.10.18.13.21.42; author lukem; state Exp; branches; next 1.6; 1.6 date 96.10.18.07.20.31; author thorpej; state Exp; branches; next 1.5; 1.5 date 96.01.04.18.25.47; author jtc; state Exp; branches; next 1.4; 1.4 date 95.03.28.17.50.14; author glass; state Exp; branches; next 1.3; 1.3 date 93.08.06.17.10.01; author mycroft; state Exp; branches; next 1.2; 1.2 date 93.08.01.07.33.15; author mycroft; state Exp; branches; next 1.1; 1.1 date 93.03.21.09.45.37; author cgd; state Exp; branches 1.1.1.1; next ; 1.23.32.1 date 2020.04.13.08.05.42; author martin; state Exp; branches; next ; commitid X01YhRUPVUDaec4C; 1.23.34.1 date 2019.09.05.08.19.41; author martin; state Exp; branches; next ; commitid t4bPHIBvxA0fyNBB; 1.21.40.1 date 2012.04.17.00.09.30; author yamt; state Exp; branches; next 1.21.40.2; 1.21.40.2 date 2012.05.23.10.08.24; author yamt; state Exp; branches; next ; 1.17.2.1 date 2004.05.17.09.17.37; author tron; state Exp; branches; next ; 1.1.1.1 date 93.03.21.09.45.37; author cgd; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 95.03.28.16.52.25; author glass; state Exp; branches; next ; desc @@ 1.24 log @du was in v1 https://www.bell-labs.com/usr/dmr/www/man12.pdf @ text @.\" $NetBSD: du.1,v 1.23 2012/05/14 21:14:14 wiz Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @@(#)du.1 8.2 (Berkeley) 4/1/94 .\" .Dd September 1, 2019 .Dt DU 1 .Os .Sh NAME .Nm du .Nd display disk usage statistics .Sh SYNOPSIS .Nm .Op Fl H | Fl L | Fl P .Op Fl a | Fl d Ar depth | Fl s .Op Fl cghikmnrx .Op Ar file ... .Sh DESCRIPTION The .Nm utility displays the file system usage for each file argument and for each directory in the file hierarchy rooted in each directory argument. If no file is specified, the block usage of the hierarchy rooted in the current directory is displayed. .Pp The options are as follows: .Bl -tag -width Ds .It Fl H Symbolic links on the command line are followed. (Symbolic links encountered in the tree traversal are not followed.) .It Fl L All symbolic links are followed. .It Fl P No symbolic links are followed. .It Fl a Display an entry for each file in the file hierarchy. .It Fl c Display the grand total after all the arguments have been processed. .It Fl d Display an entry files and directories .Ar depth directories deep. .It Fl g If the .Fl g flag is specified, the number displayed is the number of gigabyte (1024*1024*1024 bytes) blocks. .It Fl h If the .Fl h flag is specified, the numbers will be displayed in "human-readable" format. Use unit suffixes: B (Byte), K (Kilobyte), M (Megabyte), G (Gigabyte), T (Terabyte) and P (Petabyte). .It Fl i Output inode usage instead of blocks. All "human-readable" options are ignored. .It Fl k By default, .Nm displays the number of blocks as returned by the .Xr stat 2 system call, i.e. 512-byte blocks. If the .Fl k flag is specified, the number displayed is the number of kilobyte (1024 bytes) blocks. Partial numbers of blocks are rounded up. .It Fl m If the .Fl m flag is specified, the number displayed is the number of megabyte (1024*1024 bytes) blocks. .It Fl n Ignore files and directories with user .Qq nodump flag .Pq Dv UF_NODUMP set. .It Fl r Generate warning messages about directories that cannot be read. This is the default behaviour. .It Fl s Display only the grand total for the specified files. .It Fl x Filesystem mount points are not traversed. .El .Pp .Nm counts the storage used by symbolic links and not the files they reference unless the .Fl H or .Fl L option is specified. If either the .Fl H or .Fl L options are specified, storage used by any symbolic links which are followed is not counted or displayed. The .Fl H , .Fl L and .Fl P options override each other and the command's actions are determined by the last one specified. .Pp Files having multiple hard links are counted (and displayed) a single time per .Nm execution. .Sh ENVIRONMENT .Bl -tag -width BLOCKSIZE .It Ev BLOCKSIZE If the environment variable .Ev BLOCKSIZE is set, and the .Fl g , .Fl h , .Fl k , and .Fl m options are not specified, the block counts will be displayed in units of that size block. .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr df 1 , .Xr chflags 2 , .Xr fts 3 , .Xr getbsize 3 , .Xr symlink 7 , .Xr quot 8 .Sh HISTORY A .Nm command appeared in .At v1 . @ 1.23 log @Add EXIT STATUS section and bump date. From Bug Hunting. @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.22 2012/03/11 11:23:20 shattered Exp $ d32 1 a32 1 .Dd May 14, 2012 d168 1 a168 1 .At v6 . @ 1.23.32.1 log @Mostly merge changes from HEAD upto 20200411 @ text @d1 1 a1 1 .\" $NetBSD$ d32 1 a32 1 .Dd September 1, 2019 d168 1 a168 1 .At v1 . @ 1.23.34.1 log @Pull up following revision(s) (requested by sevan in ticket #174): lib/libc/sys/chmod.2: revision 1.48 lib/libc/sys/stat.2: revision 1.59 lib/libc/sys/unlink.2: revision 1.30 lib/libc/sys/lseek.2: revision 1.25 lib/libc/sys/getuid.2: revision 1.18 lib/libc/sys/chown.2: revision 1.37 lib/libm/man/exp.3: revision 1.32 lib/libm/man/log.3: revision 1.7 lib/libc/sys/open.2: revision 1.60 lib/libc/stdio/fopen.3: revision 1.36 lib/libc/stdio/putc.3: revision 1.14 lib/libc/sys/mount.2: revision 1.51 share/man/man9/copy.9: revision 1.22 share/man/man9/uiomove.9: revision 1.20 lib/libc/sys/setuid.2: revision 1.23 lib/libc/sys/close.2: revision 1.18 sbin/init/init.8: revision 1.61 lib/libc/sys/write.2: revision 1.36 lib/libc/sys/read.2: revision 1.39 sbin/init/init.8: revision 1.62 lib/libc/sys/wait.2: revision 1.40 usr.bin/tty/tty.1: revision 1.10 lib/libc/sys/link.2: revision 1.33 usr.bin/du/du.1: revision 1.24 lib/libc/stdlib/exit.3: revision 1.17 usr.bin/su/su.1: revision 1.53 usr.bin/mail/mail.1: revision 1.66 lib/libc/sys/fork.2: revision 1.25 usr.bin/su/su.1: revision 1.54 usr.bin/mail/mail.1: revision 1.67 lib/libm/man/sin.3: revision 1.15 share/man/man9/intro.9: revision 1.26 share/man/man5/utmp.5: revision 1.17 lib/libc/compat-43/creat.3: revision 1.17 lib/libc/time/ctime.3: revision 1.61 lib/libcompat/4.1/stty.3: revision 1.10 usr.bin/dc/dc.1: revision 1.3 lib/libm/man/cos.3: revision 1.17 lib/libc/sys/chdir.2: revision 1.23 lib/libc/gen/exec.3: revision 1.30 lib/libc/gen/exec.3: revision 1.31 games/bcd/bcd.6: revision 1.18 games/bcd/bcd.6: revision 1.19 usr.bin/write/write.1: revision 1.7 usr.bin/wc/wc.1: revision 1.18 usr.bin/pr/pr.1: revision 1.24 usr.bin/who/who.1: revision 1.25 lib/libc/sys/mkdir.2: revision 1.30 lib/libc/stdio/getc.3: revision 1.13 usr.bin/sort/sort.1: revision 1.40 usr.bin/mesg/mesg.1: revision 1.11 share/man/man5/passwd.5: revision 1.34 sort was there since v1 https://www.bell-labs.com/usr/dmr/www/man61.pdf dc was in v1 https://www.bell-labs.com/usr/dmr/www/man12.pdf du was in v1 https://www.bell-labs.com/usr/dmr/www/man12.pdf mail was in v1 https://www.bell-labs.com/usr/dmr/www/man12.pdf mesg was in v1 https://www.bell-labs.com/usr/dmr/www/man12.pdf Document history https://www.bell-labs.com/usr/dmr/www/man13.pdf su was in v1 https://www.bell-labs.com/usr/dmr/www/man13.pdf Document history https://www.bell-labs.com/usr/dmr/www/man13.pdf Document history https://www.bell-labs.com/usr/dmr/www/man14.pdf Update URL write was in v1 https://www.bell-labs.com/usr/dmr/www/man14.pdf grammar passwd(5) was in v1 https://www.bell-labs.com/usr/dmr/www/man51.pdf utmp(5) was present in v1 https://www.bell-labs.com/usr/dmr/www/man51.pdf Earliest version of wtmp I could find was in v3 https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5 Document history of chdir(2) https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history of chmod(2) https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history of chown(2) https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history https://www.bell-labs.com/usr/dmr/www/man21.pdf create was present in v1 https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history of exec() Move statement on execlpe() & execvpe() to HISTORY section. Document history https://www.bell-labs.com/usr/dmr/www/man21.pdf fork was present in v1 https://www.bell-labs.com/usr/dmr/www/man21.pdf stat() was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf document history of fstat() https://www.bell-labs.com/usr/dmr/www/man21.pdf getuid was present in v1 https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history https://www.bell-labs.com/usr/dmr/www/man21.pdf stty & gtty were around since v1 https://www.bell-labs.com/usr/dmr/www/man21.pdf https://www.bell-labs.com/usr/dmr/www/man22.pdf mount & umount were present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf Open was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf read was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf seek was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf setuid was in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf unlink was presen in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf wait was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf write was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf start documenting history exp was present in v1 https://www.bell-labs.com/usr/dmr/www/man31.pdf Start documenting history https://www.bell-labs.com/usr/dmr/www/man31.pdf Start documenting history https://www.bell-labs.com/usr/dmr/www/man31.pdf log appeared in v1 https://www.bell-labs.com/usr/dmr/www/man31.pdf putc & putw were in v1 https://www.bell-labs.com/usr/dmr/www/man31.pdf putchar was in v4 https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3 Start documenting history https://www.bell-labs.com/usr/dmr/www/man31.pdf Document history. https://www.bell-labs.com/usr/dmr/www/man11.pdf Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which version, hence I've skipped mentioning it. End sentence with a dot. Remove superfluous Pp. Remove superfluous Pp. Remove superfluous Ns. Remove superfluous Pp. fetch(9) -> ufetch(9) fetch(9) -> ufetch(9). Remove superfluous Pp. fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9). @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.23 2012/05/14 21:14:14 wiz Exp $ d32 1 a32 1 .Dd September 1, 2019 d168 1 a168 1 .At v1 . @ 1.22 log @PR/22405 -- extend du(1) to report inode usage. Patch provided by Jonathan Perkin. OK by wiz@@ @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.21 2006/09/24 07:19:16 wiz Exp $ d32 1 a32 1 .Dd March 4, 2012 d155 2 @ 1.21 log @Remove trailing whitespace. @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.20 2006/09/23 23:20:20 elad Exp $ d32 1 a32 1 .Dd September 24, 2006 d42 1 a42 1 .Op Fl cghkmnrx d47 1 a47 1 utility displays the file system block usage for each file argument d82 3 @ 1.21.40.1 log @sync with head @ text @d1 1 a1 1 .\" $NetBSD$ d32 1 a32 1 .Dd March 4, 2012 d42 1 a42 1 .Op Fl cghikmnrx d47 1 a47 1 utility displays the file system usage for each file argument a81 3 .It Fl i Output inode usage instead of blocks. All "human-readable" options are ignored. @ 1.21.40.2 log @sync with head. @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.21.40.1 2012/04/17 00:09:30 yamt Exp $ d32 1 a32 1 .Dd May 14, 2012 a154 2 .Sh EXIT STATUS .Ex -std @ 1.20 log @PR/34220: Tyler Spivey: feature request: --max-depth for du Thanks to Matt Fleming for porting the -d feature from FreeBSD! @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.19 2004/05/17 15:36:17 wiz Exp $ d67 2 a68 2 Display an entry files and directories .Ar depth @ 1.19 log @Use more macros. @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.18 2004/05/17 01:56:19 simonb Exp $ d32 1 a32 1 .Dd May 17, 2004 d41 1 a41 1 .Op Fl a | Fl s d66 4 @ 1.18 log @Add a "-n" flag that will ignore files/directories with the "nodump" flag set. Useful when used in conjunction with "dump -h" to size dumps. @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.17 2003/08/07 11:13:34 agc Exp $ d95 5 a99 1 Ignore files and directories with user "nodump" flag (UF_NODUMP) set. @ 1.17 log @Move UCB-licensed code from 4-clause to 3-clause licence. Patches provided by Joel Baker in PR 22365, verified by myself. @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.16 2003/04/18 13:16:50 grant Exp $ d32 1 a32 1 .Dd April 18, 2003 d42 1 a42 1 .Op Fl cghkmrx d94 2 d146 1 @ 1.17.2.1 log @Pull up revision 1.18 (requested by simonb in ticket #347): Add a "-n" flag that will ignore files/directories with the "nodump" flag set. Useful when used in conjunction with "dump -h" to size dumps. -- @ text @d1 1 a1 1 .\" $NetBSD$ d32 1 a32 1 .Dd May 17, 2004 d42 1 a42 1 .Op Fl cghkmnrx a93 2 .It Fl n Ignore files and directories with user "nodump" flag (UF_NODUMP) set. a143 1 .Xr chflags 2 , @ 1.16 log @add -g for output in gigabytes. @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.14 2002/09/27 07:18:16 wiz Exp $ d14 1 a14 5 .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors @ 1.15 log @humanize_number() actually prints 'K' as the suffix for 1024 ('k' is used for 1000). minor whitespace fix. @ text @d36 1 a36 1 .Dd September 27, 2002 d46 1 a46 1 .Op Fl chkmrx d70 5 d138 1 @ 1.14 log @Sort options. Bump date for -h addition. Begin new sentences on new lines(!). The abbreviation for 'kilo' is still a small 'k', not a capital one. Add -h to the list of options that disable display in default blocksize. @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.13 2002/09/27 03:33:33 provos Exp $ d75 1 a75 1 Use unit suffixes: B (Byte), k (Kilobyte), M (Megabyte), G (Gigabyte), d81 1 a81 1 .Xr stat 2 @ 1.13 log @human-readable output via -h flag. match output from Linux and other BSDs. Partly by Benedikt Meurer . approved by perry. closes pr 14687 and 18402. @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.12 2001/12/01 19:03:31 wiz Exp $ d36 1 a36 1 .Dd October 4, 1996 d68 9 d86 2 a87 1 (1024 bytes) blocks. Partial numbers of blocks are rounded up. a92 8 .It Fl h If the .Fl h flag is specified, the numbers will be displayed in "human-readable" format. Use unit suffixes: B (Byte), K (Kilobyte), M (Megabyte), G (Gigabyte), T (Terabyte) and P (Petabyte). .It Fl c Display the grand total after all the arguments have been processed. d133 2 a134 1 .Fl k @ 1.12 log @Use standard headers. @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.11 2001/12/01 16:43:12 wiz Exp $ d46 1 a46 1 .Op Fl ckmrx d83 6 @ 1.11 log @Whitespace cleanup. @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.10 2001/07/08 15:34:14 simonb Exp $ d119 1 a119 1 .Sh ENVIRONMENT VARIABLES @ 1.10 log @Xref getbsize(3). @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.9 2000/12/30 16:00:33 hubertf Exp $ d79 1 a79 1 If the d81 1 a81 1 flag is specified, the number displayed is the number of megabyte d98 3 a100 3 or .Fl L option is specified. d124 2 a125 2 is set, and the .Fl k @ 1.9 log @Option similar to -k, only to use megabyte (1024**2) as display unit. Patch contributed by Chris Pinnock in PR 11848. @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.8 1998/02/15 17:08:17 kleink Exp $ d134 1 @ 1.8 log @Add an `-r' flag (which is a no-op) to meet XPG4.2 requirements. @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.7 1997/10/18 13:21:42 lukem Exp $ d46 1 a46 1 .Op Fl ckrx d76 7 a82 3 flag is specified, the number displayed is the number of 1024-byte blocks. Partial numbers of blocks are rounded up. d125 4 a128 2 .Fl k option is not specified, the block counts will be displayed in units of that @ 1.7 log @WARNSify, fix .Nm usage, getopt returns -1 not EOF @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.6 1996/10/18 07:20:31 thorpej Exp $ d46 1 a46 1 .Op Fl ckx d81 3 @ 1.6 log @Implement a -c (Grand Total) option, a'la GNU du(1). From Luke Mewburn , PR #2805. @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.5 1996/01/04 18:25:47 jtc Exp $ d43 1 a43 1 .Nm du d50 1 a50 1 .Nm du d70 1 a70 1 .Nm du d87 1 a87 1 .Nm Du d110 1 a110 1 .Nm du d129 1 a129 1 .Nm du @ 1.5 log @merge in change accidently made to release branch @ text @d1 1 a1 1 .\" $NetBSD: du.1,v 1.4.2.1 1995/12/05 02:45:41 jtc Exp $ d36 1 a36 1 .Dd April 1, 1994 d46 1 a46 1 .Op Fl kx d79 2 @ 1.4 log @Merged with 4.4lite @ text @d1 1 a1 1 .\" $NetBSD$ d110 1 a110 1 .Sh ENVIRONMENTAL VARIABLES d113 1 a113 1 If the environmental variable @ 1.3 log @Incorporate new version using getbsize(), with -k flag added. @ text @d1 4 a4 2 .\" Copyright (c) 1990 The Regents of the University of California. .\" All rights reserved. d34 1 a34 2 .\" from: @@(#)du.1 6.15 (Berkeley) 3/1/92 .\" $Id: du.1,v 1.2 1993/08/01 07:33:15 mycroft Exp $ d36 1 a36 1 .Dd March 1, 1992 d38 1 a38 1 .Os BSD 4.4 d41 1 a41 1 .Nd Display disk usage statistics d44 2 a45 1 .Op Fl a Li \&| Fl s d59 7 d85 20 a104 4 If .Ar file is a symbolic link referencing an existing file, the file referenced by the link is reported on instead of the link itself. d122 2 @ 1.2 log @Add RCS indentifiers. @ text @d32 2 a33 2 .\" from: @@(#)du.1 6.13 (Berkeley) 6/20/91 .\" $Id: $ d35 1 a35 1 .Dd June 20, 1991 d85 10 d100 1 a100 1 .Nm @ 1.1 log @Initial revision @ text @d32 2 a33 1 .\" @@(#)du.1 6.13 (Berkeley) 6/20/91 @ 1.1.1.1 log @initial import of 386bsd-0.1 sources @ text @@ 1.1.1.2 log @Import from 4.4 @ text @d1 2 a2 2 .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. d32 1 a32 1 .\" @@(#)du.1 8.2 (Berkeley) 4/1/94 d34 1 a34 1 .Dd April 1, 1994 d36 1 a36 1 .Os d39 1 a39 1 .Nd display disk usage statistics d42 2 a43 3 .Op Fl H | Fl L | Fl P .Op Fl a | Fl s .Op Fl x a52 4 The number of blocks are in the same units as that returned by the .Xr stat 2 system call, i.e. 512-byte blocks. Partial numbers of blocks are rounded up. a55 7 .It Fl H Symbolic links on the command line are followed. (Symbolic links encountered in the tree traversal are not followed.) .It Fl L All symbolic links are followed. .It Fl P No symbolic links are followed. d58 11 d75 4 a78 20 .Nm Du counts the storage used by symbolic links and not the files they reference unless the .Fl H or .Fl L option is specified. If either the .Fl H or .Fl L options are specified, storage used by any symbolic links which are followed is not counted or displayed. The .Fl H , .Fl L and .Fl P options override each other and the command's actions are determined by the last one specified. a83 7 .Sh ENVIRONMENTAL VARIABLES .Bl -tag -width BLOCKSIZE .It Ev BLOCKSIZE If the environmental variable .Ev BLOCKSIZE is set, the block counts will be displayed in units of that size block. .El a85 2 .Xr fts 3 , .Xr symlink 7 , d89 1 a89 1 .Nm du @