开发者

list video devices via terminal

How do开发者_如何学运维 you list a computer's video devices via terminal? Is there a command that lists them?


To list video output devices (e.g. monitors),

$ system_profiler SPDisplaysDataType

To list video input devices (e.g. webcams),

$ system_profiler SPCameraDataType

To get just the device names, filter the list accordingly:

$ system_profiler SPCameraDataType | grep "^    [^ ]" | sed "s/    //" | sed "s/://"


system_profiler


system_profiler SPDisplaysDataType

or

ioreg | grep -i display

Note that the system_profiler command is case sensitive.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜