|
|
Retrieve S/Ns of iPods connected to your computer
Like everything else in plist XML or binary format, this file can be read more easily through the `defaults` command through Terminal, or Property List Editor if you think Terminal is scary but have XCode installed. Here's what I get when I run it and filter the output through grep to just get the models & serials I have recorded on my laptop:
$ defaults read com.apple.iPod | egrep 'Device|Serial'
Devices = {
"Serial Number" = 2X43XXXXXXX;
"Serial Number" = JQ40XXXXXXX;
"Serial Number" = JQ42XXXXXXX;
"Device Class" = iPod;
"Serial Number" = 5F64XXXXXXX;
"Device Class" = iPod;
"Serial Number" = 5U53XXXXXXX;
"Serial Number" = JQ52XXXXXXX;
"Device Class" = iPod;
"Serial Number" = JQ54XXXXXXX;
"Device Class" = iPod;
"Serial Number" = Q273XXXXXXX;
"Device Class" = iPod;
"Serial Number" = Q272XXXXXXX;
"Device Class" = iPod;
"Serial Number" = 2Z81XXXXXXX;
"Device Class" = iPod;
"Serial Number" = Q292XXXXXXX;
"Device Class" = iPod;
"Serial Number" = 8K63XXXXXXX;
"Device Class" = iPhone;
"Serial Number" = 7T72XXXXXXX;
"Device Class" = iPhone;
"Serial Number" = 8802XXXXXXX;
Much easier than trying to read the raw XML, and it's also important to be aware that plist files can either be in XML or binary format, so it might not readable in the first place. The good thing about the `defaults` command is that it understands both formats, so you don't have to worry about how or even where the plist file you care about is stored on disk, as you just call it by name and get the contents you're looking for. ---
-- DO NOT LEAVE IT IS NOT REAL
Retrieve S/Ns of iPods connected to your computer
Cool idea; I hadn't though of using `defaults`. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|