Linux Commands Examples

A great documentation place for Linux commands


find a filesystem by label or UUID

see also : blkid - fsck


findfs LABEL=label

findfs UUID=uuid

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!


devName=$(getParam media)
dev=`findfs LABEL=${devName}`
e2fsck -f $dev


findfs will search the disks in the system looking for a filesystem which has a label matching label or a UUID equal to uuid. If the filesystem is found, the device name for the filesystem will be printed on stdout.


The findfs command is part of the util-linux package and is available from

see also

blkid fsck


findfs was originally written by Theodore Ts’o (tytso[:at:]mit[:dot:]edu) and re-written for the util-linux package by Karel Zak (kzak[:at:]redhat[:dot:]com).

How can this site be more helpful to YOU ?

give  feedback