findfs command is used to find filesystems by their label or UUID. This command is useful when you need to locate a specific filesystem on your Linux system.
The syntax for the
findfs command is as follows:
findfs [OPTIONS] LABEL=LABEL/UUID=UUID
LABEL option is used to search for a filesystem by its label, while the
UUID option is used to search for a filesystem by its UUID.
Example 1: Find a filesystem by label
To find a filesystem by its label, run the following command:
This will search for a filesystem with the label “mylabel” and return the device name.
Example 2: Find a filesystem by UUID
To find a filesystem by its UUID, run the following command:
This will search for a filesystem with the UUID “123e4567-e89b-12d3-a456-426655440000” and return the device name.
The following options are available for the
||Display version information and exit.|
||Display help information and exit.|
findfs command does not return any results, check that the label or UUID you are searching for is correct. You can use the
blkid command to list all available filesystems and their labels/UUIDs.
findfscommand is part of the
util-linuxpackage, which should be installed by default on most Linux distributions.
- If you do not have root privileges, you may not be able to use the
findfscommand to search for filesystems.