• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Unique Identifier for Disk
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unique Identifier for Disk


  • Subject: Re: Unique Identifier for Disk
  • From: email@hidden
  • Date: Mon, 26 Apr 2004 16:44:23 -0400

Is there a unique identifier for a disk that is not the startup disk and that would persist over restarts so that an AppleScript script referring to the disk would work as expected even if the name of the disk changes?

Yes, via unique UNIX identifier from which one can then obtain the User editable Volume Name.

'df | grep '/dev/'| awk '{print $1}'' - via 'Terminal', or
do shell script ("df | grep '/dev/' | awk '{print $1}'") - via AppleScript's 'Script Editor' will display the UNIX low level assignment of each mounted Volume.

Replacing '$1' with '$6' will instead display the User's editable Name of the mounted Volume(s).

do shell script ("df | grep '/dev/' | awk '{print $1, $6}'") - displays both the UNIX low level assignment and User editable Name for each mounted Volume, per Line.

--

SJWL
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Backing up only new files
  • Next by Date: (OFF) Was: AppleSript & HTML Again...
  • Previous by thread: Re: Unique Identifier for Disk
  • Next by thread: Re: Unique Identifier for Disk
  • Index(es):
    • Date
    • Thread