stack. FreeBSD added some additional attributes, also supported by DragonFly BSD: (User and System) No-unlink: When set, indicates that the file or directory should not be renamed or removed. Attempts to rename or remove the file or directory will fail with a permissions error. FreeBSD also supports: (System) No-archive: When set, indicates that the file or directory should not be archived. (System) Snapshot: When set, indicates that the file or directory is a snapshot file. This attribute is maintained by the system, and cannot be set, even by the super-user. whereas DragonFly BSD supports: (User and System) No-history: When set, indicates that history should not be retained for the file or directory. (User) Swapcache: When set, indicates that clean filesystem data for the file, or for the directory and everything underneath the directory, should be cached in swap space on a solid-state drive. (System) Swapcache: When set, indicates that clean filesystem data for the file, or for the directory and everything underneath the directory, should not be cached in swap space on a solid-state drive. (System) Archived: When set, indicates that the file or directory may be archived. NetBSD added another attribute, also supported by OpenBSD: (System) Archived: When set, indicates that the file or directory is archived. macOS added three attributes: (User) Hidden: When set, indicates that the file or directory should not, by default, be displayed in the GUI; ls will display it, however. (System) Restricted: When set, indicates that the file or directory will be protected by System Integrity Protection (User and System) Compressed: Read-only attribute for files compressed using HFS+ Compression In these systems, the chflags and ls commands can be used to change and display file attributes. To change a "user" attribute on a file in 4.4BSD-derived operating systems, the user must be the owner of the file or the superuser; to change a "system" attribute, the user must be the superuser. Linux The Linux operating system can support a wide range of file attributes that can be listed by the lsattr command and modified, where possible, by the chattr command. Programs can examine and alter attributes using ioctl operations. Many Linux file systems support only a limited set of attributes, and none of them support every attribute that chattr can change. File systems that support at least some attributes include ext4, XFS and btrfs. See also Extended file attributes Hidden file and hidden directory