0
votes

I would like to be able to determine the type of a drive/device (CDROM, Floppy, Fixed Hard drive, Removable drive, etc.) in Linux either using C/C++ or bash script.

I will be given a mount point path, and I will need to display the source drive type of that mount point.

1

1 Answers

0
votes

Once you have the device node itself you can look under /sys/block or /sys/dev/block for its various characteristics.