Skip to content

The Eclectic Light Company

Macs, painting, and more
Main navigation
  • Downloads
  • M1 & M2 Macs
  • Mac Problems
  • Mac articles
  • Art
  • Macs
  • Painting
hoakley January 10, 2018 Macs, Technology

Where did that metadata come from?

There seems to be some confusion as to what metadata is, and where it is stored. This article looks at some of the most commonly-encountered metadata associated with Mac documents, explains where it is stored, and how it can be altered.

Metadata means information about the data in a document, as opposed to the content of the document itself. It can be very simple: a plain text file can have attached metadata containing details of the author, and inevitably has basic file attributes such as the date that it was created. Although the author information can be embedded in the text itself, when it is attached as a separate piece of information, it becomes metadata.

The best place to start examining metadata is in the Finder’s Get Info dialog, which provides the most ready access to much of the metadata for each file. I’ll take that dialog from the top.

metadata01a

The filename and its extension are the most fundamental attributes of a file, and key metadata. Classic Mac OS didn’t use extensions (or, rather, they didn’t mean anything to it, as it typed files according to the Finder Info), and there is still resistance from some users. Extensions don’t have to be MS-DOS-style and limited to three characters. If you want to make full use of macOS, use extensions such as .text which are helpful to the system and meaningful to humans.

Below the name, size, and datestamp of last modification, macOS shows any Finder Tags. These can be very useful metadata which you can customise, and control in the Finder. I have explained here how they work, using extended attributes. Indeed, they are the only extended attribute over which the user is given complete control.

metadata01b

macOS has many more standard attributes to display, and most of the more important ones follow in the General section.

The next extended attribute is found in More Info, where the Where from entry is taken from the extended attribute of type com.apple.metadata:kMDItemWhereFroms. Although displayed here, when present, it is not controlled by the user in the way that Finder Tags are, but attached to downloaded files by the app or service which downloads them. Once present, there is no simple way for the user to remove it.

The Finder may instead show another extended attribute in More Info if there is no com.apple.metadata:kMDItemWhereFroms attribute. One which it will display in such cases are the keywords stored in com.apple.metadata:kMDItemKeywords if present.

The Last opened datestamp is particularly useful, but is not quite correct. Services such as Quick Look and the Finder itself can peek inside files to obtain metadata and similar information without their being recorded as opening the file. So this date and time represent the moment that a user-controlled app or similar opened them. It is not an extended attribute, but part of the normal macOS attributes for files.

metadata01c

Finder Comments are under user control, being displayed and edited here, in the Get Info dialog. Although macOS stores the text in an extended attribute of type com.apple.metadata:kMDItemFinderComment, the comments themselves now appear to be stored centrally, perhaps in a Finder database. The Finder keeps the extended attribute and its central store in sync, when you move the file elsewhere its extended attribute may be preserved, but the Finder Comment lost, as it is not usually added to the local store of the destination.

This rather unexpected behaviour makes Finder Comments rather too ephemeral for most day-to-day uses.

File-specific settings for the default app of a document are stored in an extended attribute of type com.apple.LaunchServices.OpenWith, but defaults are maintained by macOS Launch Services.

metadata01d

Where possible, larger images of documents are displayed using a thumbnail created by Quick Look, and reflect the content of the document, or show a front page with a tool to play media such as audio and movies. Those previews are managed by Quick Look, and are not stored in metadata.

Where a smaller image is required, the document icon is used, according to a system of priorities:

  • If there is an extended attribute of type com.apple.ResourceFork containing an image thumbnail, that is shown as a document-specific icon.
  • If there is an established type-specific icon known to the Finder for that document type, that is shown as a type-specific icon.
  • If there is nothing of higher priority, a blank document icon will be displayed as the default.

Creating document-specific thumbnail resources is complex and tedious. It is usually far simpler to copy and paste a suitable image into the top left icon position in the Get Info dialog if you want to do this, and let the Finder create the extended attribute for you.

metadata01e

At the foot of the Get Info dialog are the permissions settings, which are part of the standard attributes of every file and folder.

metadata02

Opening customised documents using xattred shows the five most common Finder-related extended attributes, of

  • com.apple.FinderInfo, which sets some general flags for Finder, and can be used to assign a single Finder Tag;
  • com.apple.metadata:_kMDItemUserTags, which contains Finder Tag settings;
  • com.apple.metadata:kMDItemDownloadedDate, which contains the datestamp for when this item was downloaded;
  • com.apple.metadata:kMDItemFinderComment, which contains the text from the Finder Comment but does not actually set it;
  • com.apple.metadata:kMDItemWhereFroms, which contains the URL of the location from which the item was downloaded;
  • com.apple.quarantine, which forms the quarantine flag to determine if Gatekeeper should perform a full check when an app is first run.

Standard media documents contain additional metadata specific to the type of document.

metadata03

Standard still image formats, such as JPEG, may contain one or more defined sets of metadata, which will be extracted and displayed in the More Info section. These are not stored in extended attributes, but in the data of the document itself.

metadata04

The same applies to standard audio formats…

metadata05

…and standard movie/video formats. As for still images, these metadata are embedded in the document’s data, and not in extended attributes. That is to ensure that they are generally accessible across different platforms and file systems. They are also essential to be able to open and use the media content of the file.

metadata06

Some other document types also include accessible metadata within their data. A good example are the metadata fields in Acrobat PDF files, which are displayed in the More Info section of the Get Info dialog.

Such content-specific metadata are displayed in full, and where possible can be edited, in apps which work with that type of content. Thus GraphicConverter and other image editors let you add, edit, and remove various image metadata.

This leaves another 140 different types of extended attribute which contain metadata which is not shown in the Get Info dialog. These are not secret by any means – many are custom metadata used by specific apps – and all are accessible from Terminal’s command line using the xattr tool, or in xattred.

Contrary to some claims that I have seen recently, those extended attributes have long been well-respected by the majority of file systems, particularly Apple’s old HFS+ and new APFS. macOS also incorporates mechanisms for preserving them on other file systems, such as FAT variants commonly used on USB ‘thumb’ drives.

Indeed, as they are generally unseen and not removed, a little browsing of the extended attributes on most Macs reveals a treasure-trove of metadata which is extremely tenacious. Unless you deliberately go out of your way to remove it, it usually hangs on for years. Unless, of course, you transit files through iCloud Drive.

Share this:

  • Twitter
  • Facebook
  • Reddit
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

Related

Posted in Macs, Technology and tagged audio, extended attributes, Finder, image, macOS, metadata, video, xattr. Bookmark the permalink.

1Comment

Add yours
  1. 1
    Week 2 – 2018 – This Week In 4n6 on January 14, 2018 at 11:21 am

    […] He describes the metadata found on MacOS and how to display the various extended attributes. Where did that metadata come from? […]

    LikeLike

·Comments are closed.

Quick Links

  • Downloads
  • Mac Troubleshooting Summary
  • M1 & M2 Macs
  • Mac problem-solving
  • Painting topics
  • Painting
  • Long Reads

Search

Monthly archives

  • January 2023 (64)
  • December 2022 (74)
  • November 2022 (72)
  • October 2022 (76)
  • September 2022 (72)
  • August 2022 (75)
  • July 2022 (76)
  • June 2022 (73)
  • May 2022 (76)
  • April 2022 (71)
  • March 2022 (77)
  • February 2022 (68)
  • January 2022 (77)
  • December 2021 (75)
  • November 2021 (72)
  • October 2021 (75)
  • September 2021 (76)
  • August 2021 (75)
  • July 2021 (75)
  • June 2021 (71)
  • May 2021 (80)
  • April 2021 (79)
  • March 2021 (77)
  • February 2021 (75)
  • January 2021 (75)
  • December 2020 (77)
  • November 2020 (84)
  • October 2020 (81)
  • September 2020 (79)
  • August 2020 (103)
  • July 2020 (81)
  • June 2020 (78)
  • May 2020 (78)
  • April 2020 (81)
  • March 2020 (86)
  • February 2020 (77)
  • January 2020 (86)
  • December 2019 (82)
  • November 2019 (74)
  • October 2019 (89)
  • September 2019 (80)
  • August 2019 (91)
  • July 2019 (95)
  • June 2019 (88)
  • May 2019 (91)
  • April 2019 (79)
  • March 2019 (78)
  • February 2019 (71)
  • January 2019 (69)
  • December 2018 (79)
  • November 2018 (71)
  • October 2018 (78)
  • September 2018 (76)
  • August 2018 (78)
  • July 2018 (76)
  • June 2018 (77)
  • May 2018 (71)
  • April 2018 (67)
  • March 2018 (73)
  • February 2018 (67)
  • January 2018 (83)
  • December 2017 (94)
  • November 2017 (73)
  • October 2017 (86)
  • September 2017 (92)
  • August 2017 (69)
  • July 2017 (81)
  • June 2017 (76)
  • May 2017 (90)
  • April 2017 (76)
  • March 2017 (79)
  • February 2017 (65)
  • January 2017 (76)
  • December 2016 (75)
  • November 2016 (68)
  • October 2016 (76)
  • September 2016 (78)
  • August 2016 (70)
  • July 2016 (74)
  • June 2016 (66)
  • May 2016 (71)
  • April 2016 (67)
  • March 2016 (71)
  • February 2016 (68)
  • January 2016 (90)
  • December 2015 (96)
  • November 2015 (103)
  • October 2015 (119)
  • September 2015 (115)
  • August 2015 (117)
  • July 2015 (117)
  • June 2015 (105)
  • May 2015 (111)
  • April 2015 (119)
  • March 2015 (69)
  • February 2015 (54)
  • January 2015 (39)

Tags

APFS Apple AppleScript Apple silicon backup Big Sur Blake bug Catalina Consolation Console diagnosis Disk Utility Doré El Capitan extended attributes Finder firmware Gatekeeper Gérôme HFS+ High Sierra history of painting iCloud Impressionism iOS landscape LockRattler log logs M1 Mac Mac history macOS macOS 10.12 macOS 10.13 macOS 10.14 macOS 10.15 macOS 11 macOS 12 macOS 13 malware Mojave Monet Monterey Moreau MRT myth narrative OS X Ovid painting Pissarro Poussin privacy realism Renoir riddle Rubens Sargent scripting security Sierra SilentKnight SSD Swift symbolism Time Machine Turner update upgrade Ventura xattr Xcode XProtect

Statistics

  • 13,728,061 hits
Blog at WordPress.com.
Footer navigation
  • About & Contact
  • Macs
  • Painting
  • Language
  • Tech
  • Life
  • General
  • Downloads
  • Mac problem-solving
  • Extended attributes (xattrs)
  • Painting topics
  • Hieronymus Bosch
  • English language
  • LockRattler: 10.12 Sierra
  • LockRattler: 10.13 High Sierra
  • LockRattler: 10.11 El Capitan
  • Updates: El Capitan
  • Updates: Sierra, High Sierra, Mojave, Catalina, Big Sur
  • LockRattler: 10.14 Mojave
  • SilentKnight, silnite, LockRattler, SystHist & Scrub
  • DelightEd & Podofyllin
  • xattred, Metamer, Sandstrip & xattr tools
  • 32-bitCheck & ArchiChect
  • T2M2, Ulbow, Consolation and log utilities
  • Cirrus & Bailiff
  • Taccy, Signet, Precize, Alifix, UTIutility, Sparsity, alisma
  • Revisionist & DeepTools
  • Text Utilities: Nalaprop, Dystextia and others
  • PDF
  • Keychains & Permissions
  • LockRattler: 10.15 Catalina
  • Updates
  • Spundle, Cormorant, Stibium, Dintch, Fintch and cintch
  • Long Reads
  • Mac Troubleshooting Summary
  • LockRattler: 11.0 Big Sur
  • M1 & M2 Macs
  • Mints: a multifunction utility
  • LockRattler: 12.x Monterey
  • VisualLookUpTest
  • Virtualisation on Apple silicon
  • LockRattler: 13.x Ventura
Secondary navigation
  • Search

Post navigation

Adobe has updated Flash Player
Seeing History: Is perspective learned or natural?

Begin typing your search above and press return to search. Press Esc to cancel.

  • Follow Following
    • The Eclectic Light Company
    • Join 3,124 other followers
    • Already have a WordPress.com account? Log in now.
    • The Eclectic Light Company
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...
 

    %d bloggers like this: