what is major and minor?

Answer Posted / ajit mohan b

Major number
============
A number indicating which device driver should be used to
access a particular device. All devices controlled by the
same device driver have a common major device number.

Minor number
============
A number serving as a flag to a device driver.The minor
device numbers are used to distinguish between different
devices and their controllers.

Eg:

# ls -l /dev/sda1
brw-rw---- 1 root disk 8, 1 2008-09-04 08:28 /dev/sda1
rigel:~# ls -l /dev/sda2
brw-rw---- 1 root disk 8, 2 2008-09-04 08:28 /dev/sda2

You can see the major and minor device number (8,1) and
(8,2) in the ls listing for /dev/sdax

# ls -l /dev/scd0
brw-rw---- 1 root cdrom 11, 0 2008-09-04 08:28 /dev/scd0

You can see the major and minor device number (11,0)in the
ls listing for /dev/scd0

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is grep command?

533


What is mkdir p linux?

550


How to recover /etc/passwd file and /etc/shadow file?

556


How do I check cpu usage?

583


What is $@ in shell?

542






What is git command?

532


How do I find previous commands in linux?

543


How do I find old commands in linux?

553


Can I delete .bash history?

521


Which commands are used to set a processor-intensive job to use less cpu time?

570


What happens to hard link when file is deleted?

506


You want to copy the user’s home directories to a new location. Which of the following commands will accomplish this?

569


You want to know how many lines in the kickoff file contains ‘prize’. Which of the following commands will produce the desired results?

557


What is SFC command?

487


What language is a makefile written in?

528