Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unix command primer, was Re: Report gathering-UGH



On Tue, 29 Mar 2005, Chris Devers wrote:

> Use the 'system_profiler' command. Here's one way to do it:
>
>     $ /usr/sbin/system_profiler -detailLevel 2 | grep 'Serial Number:'
>           Serial Number: XB4091C1QES
>               Serial Number: DBDL919610WL
>                   Serial Number: 3JS2XGS7
>     $
>
> Note a couple of things though:
>
>     * this command does a full system scan, so it's pretty slow
>
>     * chances are you'll get more than one 'Serial Number:' line.

There turns out to be a better way to narrow this down. As a bonus, it
runs much faster, too:

    $ system_profiler SPHardwareDataType
    Hardware:

        Hardware Overview:

          Machine Model: Power Mac G5
          CPU Type: PowerPC 970  (2.2)
          Number Of CPUs: 2
          CPU Speed: 1.8 GHz
          L2 Cache (per CPU): 512 KB
          Memory: 1 GB
          Bus Speed: 900 MHz
          Boot ROM Version: 5.1.5f0
          Serial Number: XB4091C1QES
    $

So if you want to quickly & unambiguously get the machine's serial, do:

    $ system_profiler SPHardwareDataType | grep 'Serial Number'
          Serial Number: XB4091C1QES
    $

That's much better than the other way :-)

To see type types of data you can narrow down to, do a

    $ system_profiler -listDataTypes

You'll get around a dozen categories.


-- 
Chris Devers
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Remote-desktop mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/remote-desktop/email@hidden

This email sent to email@hidden

References: 
 >Report gathering-UGH (From: Jerry Fess <email@hidden>)
 >Re: Report gathering-UGH (From: Chris Devers <email@hidden>)
 >Unix command primer, was Re: Report gathering-UGH (From: Chris Devers <email@hidden>)
 >Re: Unix command primer, was Re: Report gathering-UGH (From: Jerry Fess <email@hidden>)
 >Re: Unix command primer, was Re: Report gathering-UGH (From: Chris Devers <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.