I've seen in many places used
install -d to create directories and
install -c to copy a file. Why not use
cp? Is there an advantage in using
It depends on what you're doing.
You also have options
For reference, see
"install" generally combines the following actions:
So, it follows Unix approach that a tool shall be made for a single but complete action of installing a file made by a some building tool to its working location.
The complete concept as I've described is implemented in BSD systems (in so-called "xinstall" version); I treat here "safe copy" mode (new version with atomic renaming) as vital for this. Linux systems (from coreutils) miss this important part and are prone to races between deleting and reopening by a bystander process; but this could have been covered by package managers.