How can I find the device uuid's of all connected devices through a command line script?

Edit:

instruments command is now deprecated, you should run instead

xcrun xctrace list devices

Previous answer:

If you have Xcode installed, you can use Instruments to get all known devices also. With

instruments -s devices

The answer from @KKendall set me on the right path. Here's a version with a single sed expression:

system_profiler SPUSBDataType | sed -n -E -e '/(iPhone|iPad)/,/Serial/s/ *Serial Number: *(.+)/\1/p'

install ideviceinstaller on Mac OS X via brew command: brew install ideviceinstaller

then idevice_id -l will work from terminal

Tags:

Ios

Iphone

Uuid