From: Jorge Almeida <jjalmeida@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] serial in /sys
Date: Thu, 29 Nov 2012 19:07:11 +0000 [thread overview]
Message-ID: <CAKpSnp+5a5CbMiMH4rx4Acg5KTy1kF8ViL0iS_wysLfmH9uREA@mail.gmail.com> (raw)
In-Reply-To: <CAL5FE+h4rqUzB4XqLn-u1OysJpPGUBB3Fs3h5OxCgeJxnP8DTQ@mail.gmail.com>
On Thu, Nov 29, 2012 at 6:35 PM, Marco Bonfiglio
<marco.bonfiglio@gmail.com> wrote:
>
>
> 2012/11/29 Jorge Almeida <jjalmeida@gmail.com>
>>
>> Anyone knows how to dig into /sys to find the serial number of a device
>> (say,
>> a USB pen)? I few days ago I found by trial and error something like
>> $ cat
>> /sys/devices/pci0000:00/0000:00:06.1/usb2/2-4/2-4:1.0/host13/target13:0:0/13:0:0:0/block/sdc/../../../../../serial
>> which gave me E68911000519
>> Now I can't find nothing of the sort. (Yes, I know the path changes
>> each time the
>> device is plugged in, but even so)
>> Any information that would put some order into this mess would be great.
>>
>> TIA
>>
>> Joreg Almeida
>>
>
> If by "serial" you mean UUID I personally use "ls -l /dev/disk/by-uuid/"
>
It is not the same thing, but anyway I have in /dev/disk/by-id/ a symlink
usb-silicon_-power_E68911000519-0:0 -> ../../sdd
This is indeed the device I meant, and the serial number is the "E68911000519"
substring. But this symlink exists because udev created it. I need to somehow
dig it out of /sys, not out of /dev. IOW, how did udev retrieved the
information to create the symlink? The values of ../by-uuid/ would probably be
equally good, but I don't know how to find them any more than I know how to
find the serials...
Thanks
J.A.
next prev parent reply other threads:[~2012-11-29 19:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-29 17:57 [gentoo-user] serial in /sys Jorge Almeida
2012-11-29 18:35 ` Marco Bonfiglio
2012-11-29 19:07 ` Jorge Almeida [this message]
2012-11-29 22:09 ` Kevin Chadwick
2012-11-30 10:00 ` Neil Bothwick
2012-11-30 12:48 ` Jorge Almeida
2012-11-29 19:20 ` Bruce Hill
2012-11-29 19:31 ` Jorge Almeida
2012-11-29 20:20 ` Bruce Hill
2012-11-29 20:56 ` Jorge Almeida
2012-11-29 22:35 ` Walter Dnes
2012-11-30 0:28 ` Jorge Almeida
2012-11-30 3:09 ` Walter Dnes
2012-11-30 9:58 ` Jorge Almeida
2012-12-01 3:47 ` Walter Dnes
2012-12-01 4:55 ` Joshua Murphy
2012-12-01 9:11 ` Jorge Almeida
2012-12-01 9:08 ` Jorge Almeida
2012-11-30 0:56 ` James Cloos
2012-11-30 18:02 ` Volker Armin Hemmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKpSnp+5a5CbMiMH4rx4Acg5KTy1kF8ViL0iS_wysLfmH9uREA@mail.gmail.com \
--to=jjalmeida@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox