INSTALL(1B)

πŸ“¦ version 070715, in nixos 26.05, nixpkgs unstable

πŸ’– INSTALL(1B) πŸ’–

okay so real talk, this is the BSD install command β€” it lives in section 1B of the manual, and it's filed under BSD System Compatibility. it's the girlie who copies your files into place and sets their whole outfit (owner, group, perms) while she's at it. iconic behavior honestly πŸ’…


✨ NAME ✨

install β€” the (BSD) way to install files, no cap πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

/ucb/install [-cs] [-g group] [-m mode] [-o owner] file1 file2
/ucb/install [-cs] [-g group] [-m mode] [-o owner] file . . . directory
/ucb/install -d [-g group] [-m mode] [-o owner] directory

three whole moods, pick the one that fits bestie 🌸


πŸ’« DESCRIPTION πŸ’«

so here's the vibe: install copies one regular file to a destination file, OR copies one or more regular files into a destination directory. that's literally it, that's the whole job. 🫢

and it's most commonly used inside Makefiles to install newly created software components β€” like yeah, that's where you'll actually meet her, doing the behind-the-scenes work while make runs the show. main character energy but make it humble ✨

πŸŽ€ the -d directory situation πŸŽ€

if the -d option is present, install creates the named directory β€” and yes, she also creates any non-existent parent directories along the way, no questions asked. 🧚

it is not an error if the directory already exists. she's chill like that, no drama.

the -g, -m, and -o options apply to the last pathname component only β€” just the final piece of the path, not the whole chain. and heads up: those attributes get set whether the directory is newly created or not. so like, if it already existed? she still applies them. periodt. πŸ’…

parent directories are always created using a default mode of 777 minus umask, with default ownerships. that's the rule, that's what she does, no notes. πŸ‘‘


πŸ”₯ OPTIONS πŸ”₯

the following options are also accepted, bestie:

  • -c β€” this one is ignored, it exists for compatibility only. πŸ™ˆ like, ancient versions of this command used to remove the source file unless this option was present, so she keeps it around for the old heads. nostalgia core fr fr.
  • -s β€” strip the target files (i.e. execute the strip(1) command on them). she's trimming the fat, giving those binaries a little glow-down ✨
  • -g group β€” use the given group ownership for target files. by default, the group of the invoking user is used. πŸ’œ
  • -m mode β€” set the access permissions of target files to octal mode. by default, mode 755 is used. the classic, the standard, the slay 🌈
  • -o owner β€” specifies the owner of target files. by default, target files are owned by the invoking user. πŸ“
⚠️ quick vibe check: -g, -m, and -o all do their thing in the directory case too β€” and they hit the last pathname component only. don't forget, or you'll be confused later, and i will not be held responsible 😭

🌸 SEE ALSO 🌸

cp(1), chgrp(1), chmod(1), chown(1), make(1), mkdir(1), strip(1)

the whole friend group honestly, go say hi πŸ‘‘πŸ¦‹


πŸ’Œ ok that's the whole page bestie, go forth and install your files with confidence. this one's from the Heirloom Toolchest, dated 4/17/03, and it's filed as INSTALL(1B) β€” mwah, catch you in the next manpage πŸ’–πŸŽ€βœ¨
πŸ“¦ where this page comes from