{"id":6421,"date":"2020-01-19T20:07:26","date_gmt":"2020-01-19T12:07:26","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=6421"},"modified":"2020-01-21T16:49:01","modified_gmt":"2020-01-21T08:49:01","slug":"udevadm-info","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/udevadm-info","title":{"rendered":"udevadm info\u547d\u4ee4 – \u67e5\u8be2udev\u6570\u636e\u5e93\u4e2d\u7684\u8bbe\u5907\u4fe1\u606f"},"content":{"rendered":"\n

\u4f7f\u7528udevadm info\u547d\u4ee4\u53ef\u4ee5\u67e5\u8be2udev\u6570\u636e\u5e93\u4e2d\u7684\u8bbe\u5907\u4fe1\u606f\u3002\u4e5f\u53ef\u4ee5\u4ecesysfs\u6587\u4ef6\u7cfb\u7edf\u4e2d\u67e5\u8be2\u5230\u8bbe\u5907\u7684\u5c5e\u6027\u4ee5\u8f85\u52a9\u521b\u5efaudev\u89c4\u5219\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>udevadm info [\u53c2\u6570]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-p<\/td>\u67e5\u8be2\u7cfb\u7edf\u8bbe\u5907\u7684\u8def\u5f84<\/td><\/tr>
-r<\/td>\u67e5\u8be2dev\u76ee\u5f55\u8def\u5f84\u540d<\/td><\/tr>
-q<\/td>\u67e5\u8be2\u6307\u5b9a\u7c7b\u578b\u7684\u8bbe\u5907\u4fe1\u606f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u67e5\u8be2\/dev\/sda\u8bbe\u5907\u7684\u7cfb\u7edf\u8bbe\u5907\u8def\u5f84\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# udevadm info -q path -n \/dev\/sda <\/pre>\n\n\n\n

\u67e5\u8be2\/dev\/sda\u8bbe\u5907\u7684\u7b26\u53f7\u94fe\u63a5\u6587\u4ef6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# udevadm info -q sysmlink -n \/dev\/sda <\/pre>\n\n\n\n

\u67e5\u8be2\/dev\/sda\u8bbe\u5907\u7684\u6240\u6709\u7684\u503c\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# udevadm info -q all -n \/dev\/sda<\/pre>\n","protected":false},"excerpt":{"rendered":"

\u4f7f\u7528udevadm info\u547d\u4ee4\u53ef\u4ee5\u67e5\u8be2udev\u6570\u636e\u5e93\u4e2d\u7684\u8bbe\u5907\u4fe1\u606f\u3002\u4e5f\u53ef\u4ee5\u4ecesysfs\u6587\u4ef6\u7cfb\u7edf\u4e2d\u67e5\u8be2\u5230\u8bbe\u5907\u7684\u5c5e […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6421"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=6421"}],"version-history":[{"count":1,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6421\/revisions"}],"predecessor-version":[{"id":6422,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6421\/revisions\/6422"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=6421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=6421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=6421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}