commands.sh

install

all

Copy files and set attributes. Typically used by Makefiles.

More info →

Options (4)

-o, --ownerboolean

Copy files to the destination, setting their ownership

Example: install {{[-o|--owner]}} {{user}} {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}
-g, --groupboolean

Copy files to the destination, setting their group ownership

Example: install {{[-g|--group]}} {{user}} {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}
-m, --modeboolean

Copy files to the destination, setting their `mode`

Example: install {{[-m|--mode]}} {{+x}} {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}
-p, --preserve-timestampsboolean

Copy files and apply access/modification times of source to the destination

Example: install {{[-p|--preserve-timestamps]}} {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}

Examples (6)

Copy files to the destination

install path/to/source_file1 path/to/source_file2 ... path/to/destination

Copy files to the destination, setting their ownership

install [-o|--owner] user path/to/source_file1 path/to/source_file2 ... path/to/destination

Copy files to the destination, setting their group ownership

install [-g|--group] user path/to/source_file1 path/to/source_file2 ... path/to/destination

Copy files to the destination, setting their `mode`

install [-m|--mode] +x path/to/source_file1 path/to/source_file2 ... path/to/destination

Copy files and apply access/modification times of source to the destination

install [-p|--preserve-timestamps] path/to/source_file1 path/to/source_file2 ... path/to/destination

Copy files and create the directories at the destination if they don't exist

install -D path/to/source_file1 path/to/source_file2 ... path/to/destination
made by @shridhargupta | data from tldr-pages