Changeset View
Changeset View
Standalone View
Standalone View
head/usr.bin/du/du.1
Show All 22 Lines | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" 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 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" @(#)du.1 8.2 (Berkeley) 4/1/94 | .\" @(#)du.1 8.2 (Berkeley) 4/1/94 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd November 4, 2012 | .Dd August 8, 2017 | ||||
.Dt DU 1 | .Dt DU 1 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm du | .Nm du | ||||
.Nd display disk usage statistics | .Nd display disk usage statistics | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Nm | .Nm | ||||
.Op Fl Aclnx | .Op Fl Aclnx | ||||
Show All 18 Lines | |||||
.It Fl A | .It Fl A | ||||
Display the apparent size instead of the disk usage. | Display the apparent size instead of the disk usage. | ||||
This can be helpful when operating on compressed volumes or sparse files. | This can be helpful when operating on compressed volumes or sparse files. | ||||
.It Fl B Ar blocksize | .It Fl B Ar blocksize | ||||
Calculate block counts in | Calculate block counts in | ||||
.Ar blocksize | .Ar blocksize | ||||
byte blocks. | byte blocks. | ||||
This is different from the | This is different from the | ||||
.Fl h, k, m | .Fl h, k, m, | ||||
.Fl Fl si | |||||
and | and | ||||
.Fl g | .Fl g | ||||
options or setting | options or setting | ||||
.Ev BLOCKSIZE | .Ev BLOCKSIZE | ||||
and gives an estimate of how much space the examined file hierarchy would | and gives an estimate of how much space the examined file hierarchy would | ||||
require on a filesystem with the given | require on a filesystem with the given | ||||
.Ar blocksize . | .Ar blocksize . | ||||
Unless in | Unless in | ||||
.Fl A | .Fl A | ||||
mode, | mode, | ||||
Show All 19 Lines | |||||
.Ar depth | .Ar depth | ||||
directories deep. | directories deep. | ||||
.It Fl g | .It Fl g | ||||
Display block counts in 1073741824-byte (1 GiB) blocks. | Display block counts in 1073741824-byte (1 GiB) blocks. | ||||
.It Fl h | .It Fl h | ||||
.Dq Human-readable | .Dq Human-readable | ||||
output. | output. | ||||
Use unit suffixes: Byte, Kilobyte, Megabyte, | Use unit suffixes: Byte, Kilobyte, Megabyte, | ||||
Gigabyte, Terabyte and Petabyte. | Gigabyte, Terabyte and Petabyte based on powers of 1024. | ||||
.It Fl k | .It Fl k | ||||
Display block counts in 1024-byte (1 kiB) blocks. | Display block counts in 1024-byte (1 kiB) blocks. | ||||
.It Fl l | .It Fl l | ||||
If a file has multiple hard links, count its size multiple times. | If a file has multiple hard links, count its size multiple times. | ||||
The default behavior of | The default behavior of | ||||
.Nm | .Nm | ||||
is to count files with multiple hard links only once. | is to count files with multiple hard links only once. | ||||
When the | When the | ||||
Show All 13 Lines | |||||
that cannot be opened, and so on. | that cannot be opened, and so on. | ||||
This is the default case. | This is the default case. | ||||
This option exists solely for conformance with | This option exists solely for conformance with | ||||
.St -xpg4 . | .St -xpg4 . | ||||
.It Fl s | .It Fl s | ||||
Display an entry for each specified file. | Display an entry for each specified file. | ||||
(Equivalent to | (Equivalent to | ||||
.Fl d Li 0 ) | .Fl d Li 0 ) | ||||
.It Fl Fl si | |||||
.Dq Human-readable | |||||
output. | |||||
Use unit suffixes: Byte, Kilobyte, Megabyte, | |||||
Gigabyte, Terabyte and Petabyte based on powers of 1000. | |||||
.It Fl t Ar threshold | .It Fl t Ar threshold | ||||
Display only entries for which size exceeds | Display only entries for which size exceeds | ||||
.Ar threshold . | .Ar threshold . | ||||
If | If | ||||
.Ar threshold | .Ar threshold | ||||
is negative, display only entries for which size is less than the absolute | is negative, display only entries for which size is less than the absolute | ||||
value of | value of | ||||
.Ar threshold . | .Ar threshold . | ||||
Show All 19 Lines | |||||
.Fl H , | .Fl H , | ||||
.Fl L | .Fl L | ||||
and | and | ||||
.Fl P | .Fl P | ||||
options override each other and the command's actions are determined | options override each other and the command's actions are determined | ||||
by the last one specified. | by the last one specified. | ||||
.Pp | .Pp | ||||
The | The | ||||
.Fl h, k | .Fl h, k, m | ||||
and | and | ||||
.Fl m | .Fl Fl si | ||||
options all override each other; the last one specified determines | options all override each other; the last one specified determines | ||||
the block counts used. | the block counts used. | ||||
.Sh ENVIRONMENT | .Sh ENVIRONMENT | ||||
.Bl -tag -width BLOCKSIZE | .Bl -tag -width BLOCKSIZE | ||||
.It Ev BLOCKSIZE | .It Ev BLOCKSIZE | ||||
If the environment variable | If the environment variable | ||||
.Ev BLOCKSIZE | .Ev BLOCKSIZE | ||||
is set, and the | is set, and the | ||||
.Fl h, k | .Fl h, k, m | ||||
or | or | ||||
.Fl m | .Fl Fl si | ||||
options are not specified, the block counts will be displayed in units of | options are not specified, the block counts will be displayed in units of | ||||
that block size. | that block size. | ||||
If | If | ||||
.Ev BLOCKSIZE | .Ev BLOCKSIZE | ||||
is not set, and the | is not set, and the | ||||
.Fl h, k | .Fl h, k, m | ||||
or | or | ||||
.Fl m | .Fl Fl si | ||||
options are not specified, the block counts will be displayed in 512-byte | options are not specified, the block counts will be displayed in 512-byte | ||||
blocks. | blocks. | ||||
.El | .El | ||||
.Sh EXAMPLES | .Sh EXAMPLES | ||||
Show disk usage for all files in the current directory. | Show disk usage for all files in the current directory. | ||||
Output is in human-readable form: | Output is in human-readable form: | ||||
.Pp | .Pp | ||||
.Dl # du -ah | .Dl # du -ah | ||||
Show All 24 Lines |