17 August 2017

View and remove Where From file metadata on Mac

When downloading a file on macOS, metadata may be added to the file that specifies where the file was downloaded from. This can be seen in the file's Info window:

It can also be viewed from Terminal with:

xattr -lp com.apple.metadata:kMDItemWhereFroms nameoffile.dmg

You can also use the following command to list files in a directory that have various metadata:

ls -l@

To remove the metadata, run the following in Terminal:

xattr -d com.apple.metadata:kMDItemWhereFroms nameoffile.dmg

Ta, robmathers.

No comments:

Post a Comment