{"id":343,"date":"2009-06-15T04:41:26","date_gmt":"2009-06-15T02:41:26","guid":{"rendered":"http:\/\/raftaman.net\/?p=343"},"modified":"2021-05-15T11:46:42","modified_gmt":"2021-05-15T09:46:42","slug":"using-udevadm-to-gather-information-about-specific-device","status":"publish","type":"post","link":"https:\/\/possiblelossofprecision.net\/?p=343","title":{"rendered":"Using udevadm to gather information about specific device"},"content":{"rendered":"<p>Usually, <code>udevadm<\/code> requires the sysfs device path of the device in question. But you can also ask <code>udevadm<\/code> which device path belongs to a certain device node. This gets really helpful if you combine these two queries.<\/p>\n<p>Example: You want to get a list of attributes for a specific device. You do not know the complete device path; all you know is the device node <code>\/dev\/sdb<\/code>:<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\n# udevadm info -a -p  $(udevadm info -q path -n \/dev\/sdb)\r\n<\/pre>\n<p>A nice document describing how to use this information to write udev rules can be found on <a href=\"http:\/\/www.reactivated.net\/writing_udev_rules.html\">http:\/\/www.reactivated.net\/writing_udev_rules.html<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Usually, udevadm requires the sysfs device path of the device in question. But you can also ask udevadm which device path belongs to a certain device node. This gets really helpful if you combine these two queries. Example: You want to get a list of attributes for a specific device. You do not know the complete device path; all you&#8230; <a href=\"https:\/\/possiblelossofprecision.net\/?p=343\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[19],"class_list":["post-343","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-udev"],"_links":{"self":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/343","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=343"}],"version-history":[{"count":6,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/343\/revisions"}],"predecessor-version":[{"id":381,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/343\/revisions\/381"}],"wp:attachment":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}