Blame


1 9ddaf4ab 2023-04-08 benni .\" Copyright (c) 2023 Benjamin Stürz <benni@stuerz.xyz>
2 9ddaf4ab 2023-04-08 benni .\"
3 9ddaf4ab 2023-04-08 benni .\" Permission to use, copy, modify, and distribute this software for any
4 9ddaf4ab 2023-04-08 benni .\" purpose with or without fee is hereby granted, provided that the above
5 9ddaf4ab 2023-04-08 benni .\" copyright notice and this permission notice appear in all copies.
6 9ddaf4ab 2023-04-08 benni .\"
7 9ddaf4ab 2023-04-08 benni .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 9ddaf4ab 2023-04-08 benni .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 9ddaf4ab 2023-04-08 benni .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 9ddaf4ab 2023-04-08 benni .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 9ddaf4ab 2023-04-08 benni .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 9ddaf4ab 2023-04-08 benni .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 9ddaf4ab 2023-04-08 benni .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 098df477 2023-05-30 benni .TH LSBLK 8 lsblk-@VERSION@ 2023-05-17
15 33bf1ca4 2023-04-08 benni .SH NAME
16 33bf1ca4 2023-04-08 benni lsblk \- list block devices
17 33bf1ca4 2023-04-08 benni .SH SYNOPSIS
18 5691dc7b 2023-05-05 benni .B lsblk
19 1678d261 2023-05-15 benni [\fB-abinUuV\fR]
20 5691dc7b 2023-05-05 benni [\fIdisk ...\fR]
21 33bf1ca4 2023-04-08 benni .SH DESCRIPTION
22 33bf1ca4 2023-04-08 benni The
23 33bf1ca4 2023-04-08 benni .B lsblk
24 b78f9b30 2023-04-08 benni utility can be used to examine block devices attached to the system.
25 5691dc7b 2023-05-05 benni If passed
26 5691dc7b 2023-05-05 benni .I disk
27 5691dc7b 2023-05-05 benni operands it lists the specified devices.
28 5691dc7b 2023-05-05 benni Otherwise it lists all attached block devices.
29 fc7d38e3 2023-04-08 benni .SH OPTIONS
30 fc7d38e3 2023-04-08 benni .TP
31 b78f9b30 2023-04-08 benni .B \-V
32 9c5d8ecc 2023-05-02 benni prints version information to stdout, then exit.
33 8380cc51 2023-05-01 benni .TP
34 bf0e6461 2023-05-02 benni .B \-a
35 bf0e6461 2023-05-02 benni print all fields.
36 bf0e6461 2023-05-02 benni .TP
37 1678d261 2023-05-15 benni .B \-b
38 1678d261 2023-05-15 benni don't scan for RAID volumes using
39 1678d261 2023-05-15 benni .BR bio (4) .
40 1678d261 2023-05-15 benni .TP
41 0c961f7d 2023-05-04 benni .B \-i
42 0c961f7d 2023-05-04 benni don't print fancy unicode characters, only print ASCII.
43 0c961f7d 2023-05-04 benni .TP
44 8380cc51 2023-05-01 benni .B \-n
45 8380cc51 2023-05-01 benni don't print the header.
46 9c5d8ecc 2023-05-02 benni .TP
47 1115ad3a 2023-05-05 benni .B \-U
48 1115ad3a 2023-05-05 benni also print the disklabel UID.
49 1115ad3a 2023-05-05 benni .TP
50 9c5d8ecc 2023-05-02 benni .B \-u
51 9c5d8ecc 2023-05-02 benni also print the filesystem usage of each partition
52 9c5d8ecc 2023-05-02 benni and the disklabel usage of each disk.
53 9c5d8ecc 2023-05-02 benni
54 5691dc7b 2023-05-05 benni Note: The disklabel usage is calculated by
55 5691dc7b 2023-05-05 benni summing the size of all (except "c") partitions.
56 9c5d8ecc 2023-05-02 benni
57 1115ad3a 2023-05-05 benni Note 2: lsblk shows the total amount of free space,
58 1115ad3a 2023-05-05 benni including space reserved for /root.
59 5691dc7b 2023-05-05 benni .SH EXIT STATUS
60 5691dc7b 2023-05-05 benni The
61 5691dc7b 2023-05-05 benni .B lsblk
62 5691dc7b 2023-05-05 benni utility exits 0 on success, and >0 if an error occurs.
63 5691dc7b 2023-05-05 benni .SH EXAMPLES
64 5691dc7b 2023-05-05 benni The following line lists all block devices:
65 5691dc7b 2023-05-05 benni .PP
66 5691dc7b 2023-05-05 benni .RS 5
67 5691dc7b 2023-05-05 benni lsblk
68 5691dc7b 2023-05-05 benni
69 5691dc7b 2023-05-05 benni .RE
70 5691dc7b 2023-05-05 benni The following line lists all fields of sd0:
71 5691dc7b 2023-05-05 benni .PP
72 5691dc7b 2023-05-05 benni .RS 5
73 5691dc7b 2023-05-05 benni lsblk -a sd0
74 1678d261 2023-05-15 benni .SH FIELDS
75 f14e5929 2023-05-17 benni .B NAME
76 f14e5929 2023-05-17 benni .RE
77 f14e5929 2023-05-17 benni .RS 5
78 f14e5929 2023-05-17 benni The name of the disk/partition.
79 f14e5929 2023-05-17 benni
80 f14e5929 2023-05-17 benni .RE
81 f14e5929 2023-05-17 benni .B DUID
82 f14e5929 2023-05-17 benni .RE
83 f14e5929 2023-05-17 benni .RS 5
84 f14e5929 2023-05-17 benni The disklabel UID of the disk.
85 f14e5929 2023-05-17 benni
86 f14e5929 2023-05-17 benni .RE
87 f14e5929 2023-05-17 benni .B SIZE
88 f14e5929 2023-05-17 benni .RE
89 f14e5929 2023-05-17 benni .RS 5
90 f14e5929 2023-05-17 benni The size of the partition, not the filesystem.
91 f14e5929 2023-05-17 benni
92 f14e5929 2023-05-17 benni .RE
93 f14e5929 2023-05-17 benni .B USED
94 f14e5929 2023-05-17 benni .RE
95 f14e5929 2023-05-17 benni .RS 5
96 f14e5929 2023-05-17 benni For disks: The amount of allocated disk space for partitions.
97 f14e5929 2023-05-17 benni .RE
98 f14e5929 2023-05-17 benni .RS 5
99 f14e5929 2023-05-17 benni For mounted partitions: The amount of used space.
100 f14e5929 2023-05-17 benni
101 f14e5929 2023-05-17 benni .RE
102 f14e5929 2023-05-17 benni .B FREE
103 f14e5929 2023-05-17 benni .RE
104 f14e5929 2023-05-17 benni .RS 5
105 f14e5929 2023-05-17 benni For disks: SIZE - FREE
106 f14e5929 2023-05-17 benni .RE
107 f14e5929 2023-05-17 benni .RS 5
108 f14e5929 2023-05-17 benni For partitions: FS_SIZE - FREE
109 f14e5929 2023-05-17 benni
110 f14e5929 2023-05-17 benni .RE
111 f14e5929 2023-05-17 benni .B TYPE
112 f14e5929 2023-05-17 benni .RE
113 f14e5929 2023-05-17 benni .RS 5
114 f14e5929 2023-05-17 benni For disks: The type of the disk.
115 f14e5929 2023-05-17 benni .RE
116 f14e5929 2023-05-17 benni .RS 5
117 f14e5929 2023-05-17 benni For partitions: The type of data on the partition.
118 f14e5929 2023-05-17 benni
119 f14e5929 2023-05-17 benni .RE
120 f14e5929 2023-05-17 benni .B COMMENT
121 f14e5929 2023-05-17 benni .RE
122 f14e5929 2023-05-17 benni .RS 5
123 f14e5929 2023-05-17 benni For all disks: The label of the disk.
124 f14e5929 2023-05-17 benni .RE
125 f14e5929 2023-05-17 benni .RS 5
126 f14e5929 2023-05-17 benni For RAID disks: Additionally the status of the volume.
127 f14e5929 2023-05-17 benni .RE
128 f14e5929 2023-05-17 benni .RS 5
129 f14e5929 2023-05-17 benni For mounted partitions: The first found current mount point.
130 33bf1ca4 2023-04-08 benni .SH SEE ALSO
131 9c5d8ecc 2023-05-02 benni .BR disklabel (8) ,
132 1678d261 2023-05-15 benni .BR bio (4) ,
133 9c5d8ecc 2023-05-02 benni .BR df (1)
134 5691dc7b 2023-05-05 benni .SH HISTORY
135 5691dc7b 2023-05-05 benni The
136 5691dc7b 2023-05-05 benni .B lsblk(8)
137 5691dc7b 2023-05-05 benni utility was originally written by the
138 5691dc7b 2023-05-05 benni .B util-linux
139 5691dc7b 2023-05-05 benni project.
140 5691dc7b 2023-05-05 benni This is an
141 5691dc7b 2023-05-05 benni .I incompatible
142 5691dc7b 2023-05-05 benni clone of the original \fBlsblk\fR.
143 5691dc7b 2023-05-05 benni It is incompatible because it doesn't support
144 5691dc7b 2023-05-05 benni the same set of options as the original
145 5691dc7b 2023-05-05 benni and because of differences in the output.
146 5691dc7b 2023-05-05 benni More incompatibilities are caused by specific features only being available
147 5691dc7b 2023-05-05 benni on either Linux or OpenBSD.
148 f65cdacb 2023-05-15 benni .SH AUTHORS
149 f65cdacb 2023-05-15 benni The
150 f65cdacb 2023-05-15 benni .B lsblk
151 f65cdacb 2023-05-15 benni program was written by Benjamin Stürz <benni@stuerz.xyz>.