Espellere (non smontare) i dispositivi USB tramite terminale (SSH) e redetect un dispositivo USB dopo l'espulsione

1

Oltre a fare clic con il pulsante destro del mouse sul dispositivo e selezionare l'espulsione (questo non è unmount, poiché elimina completamente il dispositivo in diskutil ), quindi sostituisci il dispositivo, esiste un modo per farlo tramite terminale?

Ad esempio, se espellisco un dispositivo di archiviazione di massa USB, verrà rimosso dall'output diskutil list . Posso trovarlo di nuovo tramite ioreg -p IOUSB -l -w 0 con l'output in quanto tale:

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"
    }
    
posta aeroxy 01.08.2017 - 06:30
fonte

0 risposte

Leggi altre domande sui tag