Sunday, 2 June 2013

Nested Sequence of Directories!

Nested Sequence of Directories!

When I searched for a file where one could (semi)control brightness I accidentally found a nested sequence of directories like below
aneesh@nb-14:~$ cd /sys/class/graphics/fb0/device
aneesh@nb-14:/sys/class/graphics/fb0/device$ cd graphics/fb0/device
aneesh@nb-14:/sys/class/graphics/fb0/device/graphics/fb0/device$ l
driver@  graphics/  modalias  power/  subsystem@  uevent
aneesh@nb-14:/sys/class/graphics/fb0/device/graphics/fb0/device$
What is the motive behind having such nested sequences of directories?
How was this possible? I figured out one possible answer to that. E.g.: for creating a sequence /a/b/a/b/a/b..., one can create a link to the directory /a and paste it in the folder /a/b. Is this the only way nested sequences can be formed?
Symbolically it's not obvious: To verify this I tried giving command l (see above) and found symbols against each file/directory. I learnt from this forum itself that in the result of l, the symbol @ is for indicating drivers and / for directories. But no symbolic indication to show that a certain folder is actually a link to another one! Also, there's no manual entry about l to find which symbol (if any) indicates file link.

No comments:

Post a Comment