Installation guide

Archiving File Systems With ACLs
103
getfacl home/john/picture.png
The above command returns the following output:
# file: home/john/picture.png
# owner: john
# group: john
user::rw-
group::r--
other::r--
If a directory with a default ACL is specified, the default ACL is also displayed as illustrated below. For
example, getfacl home/sales/ will display similar output:
# file: home/sales/
# owner: john
# group: john
user::rw-
user:barryg:r--
group::r--
mask::r--
other::r--
default:user::rwx
default:user:john:rwx
default:group::r-x
default:mask::rwx
default:other::r-x
16.5. Archiving File Systems With ACLs
By default, the dump command now preserves ACLs during a backup operation. When archiving a file
or file system with tar, use the --acls option to preserve ACLs. Similarly, when using cp to copy
files with ACLs, include the --preserve=mode option to ensure that ACLs are copied across too.
In addition, the -a option (equivalent to -dR --preserve=all) of cp also preserves ACLs during
a backup along with other information such as timestamps, SELinux contexts, and the like. For more
information about dump, tar, or cp, refer to their respective man pages.
The star utility is similar to the tar utility in that it can be used to generate archives of files; however,
some of its options are different. Refer to Table 16.1, “Command Line Options for star for a listing
of more commonly used options. For all available options, refer to man star. The star package is
required to use this utility.
Table 16.1. Command Line Options for star
Option Description
-c Creates an archive file.
-n Do not extract the files; use in conjunction with -x to show
what extracting the files does.
-r Replaces files in the archive. The files are written to the
end of the archive file, replacing any files with the same
path and file name.
-t Displays the contents of the archive file.
-u Updates the archive file. The files are written to the end
of the archive if they do not exist in the archive, or if the