sudo xattr -d com.apple.quarantine /Applications/xxxx.app
The xattr command can be used to display, modify or remove the extended attributes of one or more files, including directories and symbolic links. Extended attributes are arbitrary metadata stored with a file, but separate from the filesystem attributes (such as modification time or file size). The metadata is often a null-terminated UTF-8 string, but can also be arbitrary binary data.
One or more files may be specified on the command line. For the first two forms of the command, when there are more than one file, the file name is displayed along with the actual results. When only one file is specified, the display of the file name is usually suppressed (unless the -v option described below, is also specified).
In the first form of the command (without any other mode option specified), the names of all extended attributes are listed. Attribute names can also be displayed using ``ls -l@''.
In the second form, using the -p option (``print''), the value associated with the given attribute name is displayed. Attribute values are usually displayed as strings. However, if nils are detected in the data, the value is displayed in a hexadecimal representation.
The third form, with the -w option (``write''), causes the given attribute name to be assigned the given value.
The fourth form, with the -d option (``delete''), causes the given attribute name (and associated value), to be removed.
In the fifth form, with the -c option (``clear''), causes all attributes (including their associated values), to be removed.
Finally, the last form, with either the -h or --help option, displays a short help message and exits immediately.
Mac OS X 10.4 and later support extended attributes by making use of the HFS+ filesystem Attributes File B-tree feature which allows for named forks. Although the named forks in HFS+ support arbitrarily large amounts of data through extents, the OS support for extended attributes only supports inline attributes, limiting their size to that which can fit within a single B-tree node. Any regular file may have a list of extended attributes. HFS+ supports an arbitrary number of named forks, and it is unknown if macOS imposes any limit on the number of extended attributes.
Each attribute consists of a name and the associated data. The name is a null-terminated Unicode string. No namespace restrictions are present (making this an open xattr system) and the convention is to use a reverse DNS string (similar to Uniform Type Identifiers) as the attribute name.
macOS supports listing, getting, setting, and removing extended attributes from files or directories using a Linux-like API. From the command line, these abilities are exposed through the xattr utility.
Since macOS 10.5, files originating from the web are marked with com.apple.quarantine via extended file attributes. In some older versions of macOS (such as Mac OS X 10.6), user space extended attributes were not preserved on save in common Cocoa applications (TextEdit, Preview etc.).
只摘录了关于mac os x的描述，完整的可以参考：维基百科-extended file attribute
1）Mac OS X 10.4和更高版本通过使用HFS +文件系统属性文件B *-树功能来支持扩展属性