View & Remove Mac Extended Attributes from a File
January 21, 2019 | 01:40 PM
Extended Attributes are metadata components specific to files and file types on Mac OS. Those extended attributes can be identifying information about the file itself, such as quarantine information, origin data, label information, amongst other types of metadata.
Being able to view or modify extended attributes can be helpful.
To view the extended attributes of a file, open terminal and type the following:
You may see something like the following after executing the command:
xattr ~/Desktop/samplefile.jpg com.apple.metadata:kMDItemIsScreenCapture com.apple.metadata:kMDItemScreenCaptureGlobalRect com.apple.metadata:kMDItemScreenCaptureType com.apple.metadata:kMDItemWhereFroms com.apple.quarantine
How to Remove Extended Attributes from a File on Mac
To remove a specific attribute from a file, type the following with the attribute you would like to remove:
xattr -d com.apple.metadata:kMDItemIsScreenCapture ~/Desktop/samplefile.jpg