gnu_dev_minor - Linux


gnu_dev_minor is a Linux utility that extracts the minor device number from a given device path. It is particularly useful for identifying the partition or subdevice of a block or character device.


gnu_dev_minor [OPTION] [DEVICE]


  • -d, –devno: Display the major and minor device numbers separated by a slash (/).
  • -h, –help: Display the help message and exit.
  • -V, –version: Display the version information and exit.


  • Extract the minor device number of the first partition of the disk "/dev/sda":
gnu_dev_minor /dev/sda1
  • Output the major and minor device numbers of the loopback device "/dev/loop4":
gnu_dev_minor -d /dev/loop4

Common Issues

  • Invalid device path: Ensure that the specified device path is valid and exists.
  • Non-existent device: The device specified might not exist or be disconnected.


gnu_dev_minor can be combined with other Linux commands for advanced tasks:

  • With lsblk: To identify the minor device numbers of all block devices:
lsblk -dno
  • With find: To find files with a specific minor device number:
find . -type b -minorg 8

Related Commands

  • lsblk
  • fdisk
  • parted