2

I don't throw out my old drives. I finally got a big NAS and I'm slowly going through the old drives copying the useful data to the NAS.

Some of the drives were the boot drives from old laptops. It would be nice if I knew the hostname of the laptop that the drive came from. I'm not booting from the drive. It is just connected as an external drive.

Is there a file somewhere that contains the old hostname or some other process I can do to get what the old hostname was?

IconDaemon
  • 19,234
pedz
  • 443

1 Answers1

1

Did a Finder search, including system files, and found the following files containing the hostname:

/Users/<username>/Pictures/Photos Library.photoslibrary/database/Photos.sqlite.lock

and

/Users/<username>/Library/Photos/Libraries/Syndication.photoslibrary/database/Photos.sqlite.lock

Contents look something like this, with your own hostname and UUID values in the appropriate key strings:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>hostname</key>
    <string>actual_hostname.lan</string>
    <key>hostuuid</key>
    <string>XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX</string>
    <key>pid</key>
    <integer>1173</integer>
    <key>processname</key>
    <string>photolibraryd</string>
    <key>uid</key>
    <integer>501</integer>
</dict>
</plist>

There may be other files that Finder doesn't search. You might try using the grep command. See man grep for more info, or try the ideas suggested in the SO question: How to find all files containing a specific text (string) on Linux?.

leanne
  • 541