通过终端(SSH)弹出(不是卸载)USB设备,弹出后重新检测USB设备

通过终端(SSH)弹出(不是卸载)USB设备,弹出后重新检测USB设备

这是一个 macOS 问题 (Unix),由于 Ask Different 没有很多懂行的终端用户,所以我在这里提问。

除了右键单击设备并选择弹出(这不是卸载,因为它完全删除了设备中的设备diskutil),然后重新插入设备,还有其他方法可以通过终端执行此操作吗?

例如,如果我弹出 USB 大容量存储设备,它将从diskutil list输出中删除。我可以ioreg -p IOUSB -l -w 0通过输出再次找到它:

Mass Storage@1d160000  <class AppleUSBDevice, id 0x1000009d8, registered, matched, active, busy 0 (1 ms), retain 14>
{
    "sessionID" = 8439571007835
    "iManufacturer" = 1
    "bNumConfigurations" = 1
    "idProduct" = 25479
    "bcdDevice" = 262
    "Bus Power Available" = 250
    "USB Address" = 2
    "bMaxPacketSize0" = 64
    "iProduct" = 2
    "iSerialNumber" = 3
    "bDeviceClass" = 0
    "Built-In" = No
    "locationID" = 487981056
    "bDeviceSubClass" = 0
    "bcdUSB" = 512
    "USB Product Name" = "Mass Storage"
    "PortNum" = 6
    "non-removable" = "no"
    "IOCFPlugInTypes" = {"9dc7b780-9ec0-11d4-a54f-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}
    "bDeviceProtocol" = 0
    "IOUserClientClass" = "IOUSBDeviceUserClientV2"
    "IOPowerManagement" = {"DevicePowerState"=0,"CurrentPowerState"=3,"CapabilityFlags"=65536,"MaxPowerState"=4,"DriverPowerState"=3}
    "kUSBCurrentConfiguration" = 1
    "Device Speed" = 2
    "USB Vendor Name" = "Generic"
    "idVendor" = 1423
    "IOGeneralInterest" = "IOCommand is not serializable"
    "USB Serial Number" = "29FEA949"
    "IOClassNameOverride" = "IOUSBDevice"
}

相关内容