what is install (install binaries ) command in freebsd14.1 ?

Dear all:
i have meet question. the command name is install . i don't know what is it ,
1.what is the main function with this command ?
2. when we can use it ?
3. we have pkg tools for install all packages. why we need this guy ? thanks.
 
Many commands have manual pages, install(1)
when we can use it ?
There are many uses for it, it's quite a powerful command.
we have pkg tools for install all packages. why we need this guy ? thanks.
Packages are created from ports, ever wondered how a port can install things? It's also useful in rc(8) scripts to make sure a directory or file exists with the proper ownership and permissions.

Code:
# grep -r install /etc/rc.d/*
/etc/rc.d/accounting:   install -o root -g wheel -m 0640 /dev/null "${accounting_file}"
/etc/rc.d/dhclient:     install -d -o root -g wheel -m 755 ${pidfile%/*}
/etc/rc.d/ip6addrctl:   cat <<EOT | ${IP6ADDRCTL_CMD} install /dev/stdin
/etc/rc.d/ip6addrctl:   cat <<EOT | ${IP6ADDRCTL_CMD} install /dev/stdin
/etc/rc.d/ip6addrctl:   # install the policy of the address selection algorithm.
/etc/rc.d/ip6addrctl:                   ${IP6ADDRCTL_CMD} install "${config_file}"
/etc/rc.d/jail: /usr/bin/install -m 0644 -o root -g wheel /dev/null $_conf || return 1
/etc/rc.d/motd:                 install -c -o root -g wheel -m ${PERMS} /dev/null "${TEMPLATE}"
/etc/rc.d/motd: install -C -o root -g wheel -m "${PERMS}" "$T" "${TARGET}"
/etc/rc.d/os-release:   install -C -o root -g wheel -m ${osrelease_perms} "$t" "${osrelease_file}"
/etc/rc.d/routing:      # Disable installing the default interface when we act
/etc/rc.d/sendmail:             /usr/bin/install -m 640 -o root -g wheel /dev/null /var/log/sendmail.st
 
Many commands have manual pages, install(1)

There are many uses for it, it's quite a powerful command.

Packages are created from ports, ever wondered how a port can install things? It's also useful in rc(8) scripts to make sure a directory or file exists with the proper ownership and permissions.

Code:
# grep -r install /etc/rc.d/*
/etc/rc.d/accounting:   install -o root -g wheel -m 0640 /dev/null "${accounting_file}"
/etc/rc.d/dhclient:     install -d -o root -g wheel -m 755 ${pidfile%/*}
/etc/rc.d/ip6addrctl:   cat <<EOT | ${IP6ADDRCTL_CMD} install /dev/stdin
/etc/rc.d/ip6addrctl:   cat <<EOT | ${IP6ADDRCTL_CMD} install /dev/stdin
/etc/rc.d/ip6addrctl:   # install the policy of the address selection algorithm.
/etc/rc.d/ip6addrctl:                   ${IP6ADDRCTL_CMD} install "${config_file}"
/etc/rc.d/jail: /usr/bin/install -m 0644 -o root -g wheel /dev/null $_conf || return 1
/etc/rc.d/motd:                 install -c -o root -g wheel -m ${PERMS} /dev/null "${TEMPLATE}"
/etc/rc.d/motd: install -C -o root -g wheel -m "${PERMS}" "$T" "${TARGET}"
/etc/rc.d/os-release:   install -C -o root -g wheel -m ${osrelease_perms} "$t" "${osrelease_file}"
/etc/rc.d/routing:      # Disable installing the default interface when we act
/etc/rc.d/sendmail:             /usr/bin/install -m 640 -o root -g wheel /dev/null /var/log/sendmail.st
dear sirdice:
i have read the manual papes before post this question in there. i still confuse this. thanks
 
I think it might be caused by a language barrier, what do you think "install" means?
 
Well, here's the most helpful part (I hope) of the Wikipedia article:
The install command is a Unix program used to copy files and set file permissions. Some implementations offer to invoke strip while installing executable files.

The command is not defined in POSIX. It has mostly split into two camps in terms of compatibility, a GNU type and a BSD type. The main incompatibility lies in the definition of options -D and -d. The command is available as a separate package for Microsoft Windows as part of the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities.
There are various links and such in the article but hopefully, this gives you at least part of what you need. The links that show up in what I quoted go back Wikipedia, so probably not helpful to you.
 
Back
Top