``
ioreg -p IOUSB -w0 | sed 's/[^o]*o //; s/@.*$//' | grep -v '^Root.*'``
```
```
ioreg -p IOUSB -w0 -l
```
```
ioreg -p IOUSB
```
```
//
//main.m
//USBDDD
//
//Created by dengbb on 14/06/2017.
//Copyright © 2017 mohekeji. All rights reserved.
//
#import
#include
#include
#include
#include
#import
intmain(intargc,constchar* argv[]) {
returnNSApplicationMain(argc, argv);
}
voidlistProperties(io_service_tService){
CFMutableDictionaryRefpropertiesDict;
kern_return_tkr =IORegistryEntryCreateCFProperties(Service, &propertiesDict,kCFAllocatorDefault,kNilOptions);
if(!kr){
fprintf(stderr,"Error geting propertiex..\n");
return;
}
CFDataRefxml =CFPropertyListCreateXMLData(kCFAllocatorDefault, (CFPropertyListRef)propertiesDict);
if(xml) {
write(1,CFDataGetBytePtr(xml),CFDataGetLength(xml));
CFRelease(xml);
}
}
```