file

Name

file  --  install a regular file

Synopsis

file {source} {destination} [mode=mode] [owner=user] [group=group]

Description

file adds a command that copies a regular file to the files target while setting its permission modes, owner and group. source is the relative file name of the file to be copied. destination is the absolute name, in the target directory of the build type used, of either the copy, or the directory where the copy should be written.

file can be used for overriding (by overwriting) a regular file installed by a package, since the commands of all packages' install targets are executed before the commands of the files target.

Options

group=group

Set the group ownership of the installed file to group. The default is the current group of the process. group may be either a group name or a numeric group id.

mode=mode

Set the permissions for the installed file to mode. The format of mode is the same as the format of the -m option of the install program. The default mode is 0755, i.e. read, write and execute for the owner, and read and execute for group and other.

owner=user

Set the ownership of the installed file to user. The default is root. user may be either a user name or a numeric user ID.

Example

Install a local inittab in /etc/ of the target file system:

    file files/etc/inittab /etc/inittab mode=0644 owner=root group=root
    

See Also

buildtype(3), directory(3), symlink(3)