• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

findfs Command Examples in Linux

by Deepika

findfs is a command-line tool used to find a file system by either its label or UUID (Universally Unique Identifier) on a Linux or Unix-based system. It is a part of the util-linux package and can be used to locate a specific file system in a system with multiple file systems.

A file system label is a human-readable name that is assigned to a file system, typically at the time of its creation. A UUID, on the other hand, is a unique identifier that is assigned to a file system by the operating system, and it is not intended to be human-readable.

The findfs command can be used to find a file system by either its label or UUID. When used with the -l option, it will look for a file system with a specific label. When used with the -u option, it will look for a file system with a specific UUID. Once a file system is found, the command will return its device name, which can then be used to mount or work with the file system.

For example, to find a file system with the label “data”, the command would be:

# findfs LABEL="data"

To find a file system with UUID “8cc0f05e-7c9b-4c0d-8a2b-3f6f3e6e0c6a” the command would be:

# findfs UUID="8cc0f05e-7c9b-4c0d-8a2b-3f6f3e6e0c6a"

findfs Command Examples

1. Search block devices by filesystem label:

# findfs LABEL=label

2. Search by filesystem UUID:

# findfs UUID=uuid

3. Search by partition label (GPT or MAC partition table):

# findfs PARTLABEL=partition_label

4. Search by partition UUID (GPT partition table only):

# findfs PARTUUID=partition_uuid

Filed Under: Linux

Some more articles you might also be interested in …

  1. fail2ban-client Command Examples in Linux
  2. How to shrink root filesystem on CentOS / RHEL 6
  3. How to effectively use Man Pages under Linux
  4. hdiutil Command Examples in Mac
  5. CentOS / RHEL 7 : How to boot into rescue mode from installation DVD/ISO
  6. How to delete a partition using fdisk
  7. 11 Useful “ssh” and “scp” Commands in Linux
  8. join Command Examples in Linux
  9. How to allow ssh with empty passwords in Linux
  10. 14 Useful “cat” Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • fprintd-delete Command Examples in Linux
  • fprintd-delete: command not found
  • foreman: command not found
  • foreman Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright