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

How do I find the console in linux?

542


How do I navigate in cmd?

533


You want to verify which lines in the file kickoff contain ‘bob’. Which of the following commands will accomplish this?

581


What is nbtstat command?

585


How do I find previous commands in linux?

533






Which command would you use if you want to remove the password assigned to a group?

520


What is cpu in top command?

549


How do I know my linux shell version?

503


Who is unix command?

547


What is the difference between command ‘ping’ and ‘ping6’?

525


Where can I find bash in linux?

532


Brief about the command kill PID?

586


Write a command that will look for files with an extension "c", and has the occurrence of the string "apple" in it.

1158


You wish to print a file ‘draft’ with 60 lines to a page. What command would you use?

557


Which are the linux directory commands?

556