Linux.com

Re:Off topic but I gotta ask

Posted by: Anonymous Coward on January 05, 2007 01:15 AM
you can use devices not only by classical filedev names like:

hard drives:<nobr> <wbr></nobr>/dev/hda1

input devices like mouse:<nobr> <wbr></nobr>/dev/input/mouse0 or<nobr> <wbr></nobr>/dev/input/event0 (/dev/input/js0 or<nobr> <wbr></nobr>/dev/input/event0 alsa for joysticks nad other devices usung evdev interface)

In new kernel you have 'devices' in '/dev' also in other places with new scemes for names.
I will give example for my hard drive, but there are also other similiar naming schemes(to understa nd try to search for 'UDEV' and 'HAL'.
You can still acces drives in old way, but now you can acces also them by:
(normally<nobr> <wbr></nobr>/dev/hda)

-'by-id' i.e<nobr> <wbr></nobr>/dev/disk/by-id/ata-SAMSUNG_SP2514N_S08BJ1JL90068<nobr>9<wbr></nobr>
this was for all hdd, but you can also acces partion, i.e. ata-SAMSUNG_SP2514N_S08BJ1JL900689-part1
(its something like<nobr> <wbr></nobr>/dev/hda1)

-'by-label' i.e.<nobr> <wbr></nobr>/dev/disk/by-label/BOOT
I think you understand that every partion has theyr own label(on windows too). There can be problem if more than one partition has identical LABEL

-'by-label' i.e.<nobr> <wbr></nobr>/dev/disk/by-uuid/20671e62-9754-4771-87ca-cdd265c<nobr>a<wbr></nobr> 345b
Every partiotion has their UUID, which is randomly created(during disk creation, or set manually later) unique identifier. Its impossible(not really) to have 2 partitions with identical UUID by accident. Ubuntu use this scheme in fstab, so you can add partion beetwen now existed, numbers of partions will change(so<nobr> <wbr></nobr>/dev/hda3 will be<nobr> <wbr></nobr>/dev/hda4 i.e.), but you will be able to access them still by same UUID which is written on partition.

-"by-id" i.e.<nobr> <wbr></nobr>/dev/disk/by-path/pci-0000:00:11.1-ide-0:0
This show first partition on first disk connected to the IDE controller which is plugged into pci(virtually, its onboard integrated controller) bus with number 0000:00:11.1.

A dont have any scanner now, so a gaved examples with hdd, but i hope it will be similiar with scanners.

#

Return to How to configure a scanner's buttons on Linux