findfs - Man Page
find a filesystem by label or UUID
Examples (TL;DR)
- Search block devices by filesystem label:
findfs LABEL=label
- Search by filesystem UUID:
findfs UUID=uuid
- Search by partition label (GPT or MAC partition table):
findfs PARTLABEL=partition_label
- Search by partition UUID (GPT partition table only):
findfs PARTUUID=partition_uuid
Synopsis
findfs NAME=value
Description
findfs will search the block devices in the system looking for a filesystem or partition with specified tag. The currently supported tags are:
- LABEL=<label>
Specifies filesystem label.
- UUID=<uuid>
Specifies filesystem UUID.
- PARTUUID=<uuid>
Specifies partition UUID. This partition identifier is supported for example for GUID Partition Table (GPT) partition tables.
- PARTLABEL=<label>
Specifies partition label (name). The partition labels are supported for example for GUID Partition Table (GPT) or MAC partition tables.
If the filesystem or partition is found, the device name will be printed on stdout.
The complete overview about filesystems and partitions you can get for example by
lsblk --fs
partx --show <disk>
blkid
- -h, --help
Display help text and exit.
- -V, --version
Print version and exit.
Exit Status
- 0
success
- 1
label or uuid cannot be found
- 2
usage error, wrong number of arguments or unknown option
Environment
- LIBBLKID_DEBUG=all
enables libblkid debug output.
Authors
findfs was originally written by Theodore Ts’o and re-written for the util-linux package by Karel Zak.
See Also
Reporting Bugs
For bug reports, use the issue tracker at https://github.com/util-linux/util-linux/issues.
Availability
The findfs command is part of the util-linux package which can be downloaded from Linux Kernel Archive.
Referenced By
blkid(8), libblkid(3), open_by_handle_at(2), wipefs(8).