Celeb Glow
updates | March 15, 2026

How to view photos in "Photos Library.photoslibrary" created by Mac OS Catalina in Linux & Windows

I have a Mac. I also have a NAS.

I sync files by using rsync(in the right way). After synchronization, I can see the "Photos Library.photoslibrary" is recognized by Linux as a folder.

[i@one Photos Library]$ l
total 20
drwxr-xr-x 7 i i 4096 Feb 9 03:15 Photos
-rwxr-xr-x 1 i i 6148 Aug 2 15:32 .DS_Store
[i@one Photos Library]$ cd Photos\
[i@one Photos Library.photoslibrary]$ d
29M database
44K external
3.3G originals
11M private
639M resources
3.9G total
[i@one Photos Library.photoslibrary]$ cd originals/
[i@one originals]$ l
total 200
drwxr-xr-x 2 i i 12288 Jul 31 20:35 0/
drwxr-xr-x 2 i i 12288 Aug 1 11:46 1/
drwxr-xr-x 2 i i 12288 Aug 1 11:46 2/
drwxr-xr-x 2 i i 12288 Jul 31 20:35 3/
drwxr-xr-x 2 i i 12288 Jul 31 20:35 4/
drwxr-xr-x 2 i i 12288 Aug 1 11:46 5/
drwxr-xr-x 2 i i 12288 Jul 31 20:35 6/
drwxr-xr-x 2 i i 12288 Jul 31 20:35 7/
drwxr-xr-x 2 i i 12288 Jul 31 20:35 8/
drwxr-xr-x 2 i i 12288 Jul 31 20:35 9/
drwxr-xr-x 2 i i 12288 Jul 31 20:35 A/
drwxr-xr-x 2 i i 12288 Jul 31 20:35 B/
drwxr-xr-x 2 i i 12288 Jul 31 20:35 C/
drwxr-xr-x 2 i i 12288 Jul 31 20:35 D/
drwxr-xr-x 2 i i 12288 Jul 31 20:35 E/
drwxr-xr-x 2 i i 12288 Jul 31 20:35 F/
[i@one originals]$ l 0/
total 142084
-rw-r--r-- 1 i i 356702 Feb 10 04:02 0025DD5C-1E70-4F85-938B-3EA0629FDE0F.jpeg
-rwxrwxrwx 1 i i 2034724 Aug 1 02:43 00486A0A-D20C-4A77-9EA7-16EB592913C1.jpeg
-rw------- 1 i i 4769392 Feb 9 03:26 006C3459-F1FA-4A55-878A-6FB59D1406F9.jpeg
-rw-r--r-- 1 i i 537983 Feb 10 03:53 00755EF5-CDA6-4A2E-B436-0B026D1B2F2C.jpeg
-rwxrwxrwx 1 i i 2072943 Jul 31 23:37 00923247-B742-4EC9-ABB0-C3CFF51D13A7.jpeg
... ...

All the actual photos are in the folder originals. But the problem is:

  1. The file names of every photo are all UUIDs instead of the actual file name.
  2. My Photo Library has a structure. It has folders, albums. But this is just folder 0 to F.

I tried to open the database from Photos , and I found a lot of values in there:

ZORIGINALFILENAME
ZMASTERFINGERPRINT
ZFILENAME
ZCLOUDASSETGUID
ZUUID
ZIMPORTSESSIONID
... ...

I think I'm close to the answer now. But I still couldn't link them together to find the file name. And I can't find the structure information.

Is there a script or something that converts .photoslibrary to just normal folders. Or can anyone familiar with the database help me understand it so I can write the converting script on my own?

2 Answers

The .photoslibrary structure is indeed a folder. macOS just treats anything with that extension as a file. It does the same with Applications, they're also really folders - the 'guts' are hidden from the casual user, but can be seen by right-clicking & selecting 'Show package contents' on a Mac.

Anyway - your photos…
Because the visible structure to a Mac user viewing normally via the Photos app is managed by rather complex sql data structures, you're best to avoid those to view on any other OS.

The folder you really need, to see the originals rather than sorted or edited versions for Photos itself is the Masters folder. This is subdivided then by date, in year/month/day/IDtag/ so it's a bit of a long path to get through all items, but that's your 'true' location for all the originals.

BTW, the 'originals' folder is a hang-over from a much older structure, possibly from iPhoto or maybe even Aperture.
I am assuming it goes without saying that you really don't want to be changing any part of this structure, only observing.

2

In Catalina, the table ZGENERICASSET has columns ZDIRECTORY and ZFILENAME, and the table ZADDITIONALASSETATTRIBUTES has the columns ZORIGINALFILENAME and ZTITLE.

ZADDITIONALASSETATTRIBUTES.ZASSET = ZGENERICASSET.Z_PK

Use an SQL query to map the original file names (ZORIGINALFILENAME) and any titles that you may have added via Get Info in Photos (ZTITLE) to the ZDIRECTORY (folder names 0-9, A-F) and ZFILENAME (long-string GUID names of image files).

Catalina’s ZGENERICASSET is called ZASSET in Big Sur.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy