Blob


1 .\" Copyright (c) 2023 Benjamin Stürz <benni@stuerz.xyz>
2 .\"
3 .\" Permission to use, copy, modify, and distribute this software for any
4 .\" purpose with or without fee is hereby granted, provided that the above
5 .\" copyright notice and this permission notice appear in all copies.
6 .\"
7 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 .TH LSBLK 8 lsblk-@VERSION@ 2023-05-05
15 .SH NAME
16 lsblk \- list block devices
17 .SH SYNOPSIS
18 .B lsblk
19 [\fB-Vainu\fR]
20 [\fIdisk ...\fR]
21 .SH DESCRIPTION
22 The
23 .B lsblk
24 utility can be used to examine block devices attached to the system.
25 If passed
26 .I disk
27 operands it lists the specified devices.
28 Otherwise it lists all attached block devices.
29 .SH OPTIONS
30 .TP
31 .B \-V
32 prints version information to stdout, then exit.
33 .TP
34 .B \-a
35 print all fields.
36 .TP
37 .B \-i
38 don't print fancy unicode characters, only print ASCII.
39 .TP
40 .B \-n
41 don't print the header.
42 .TP
43 .B \-u
44 also print the filesystem usage of each partition
45 and the disklabel usage of each disk.
47 Note: The disklabel usage is calculated by
48 summing the size of all (except "c") partitions.
50 Note 2: There may be a small deviance in the filesystem usage,
51 please consult df(1) for more correct numbers.
53 .SH EXIT STATUS
54 The
55 .B lsblk
56 utility exits 0 on success, and >0 if an error occurs.
58 .SH EXAMPLES
59 The following line lists all block devices:
60 .PP
61 .RS 5
62 lsblk
64 .RE
65 The following line lists all fields of sd0:
66 .PP
67 .RS 5
68 lsblk -a sd0
70 .SH SEE ALSO
71 .BR disklabel (8) ,
72 .BR df (1)
74 .SH HISTORY
75 The
76 .B lsblk(8)
77 utility was originally written by the
78 .B util-linux
79 project.
80 This is an
81 .I incompatible
82 clone of the original \fBlsblk\fR.
83 It is incompatible because it doesn't support
84 the same set of options as the original
85 and because of differences in the output.
86 More incompatibilities are caused by specific features only being available
87 on either Linux or OpenBSD.