1994-05-27 12:33:43 +00:00
|
|
|
.\" Copyright (c) 1987, 1990, 1993
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by the University of
|
|
|
|
.\" California, Berkeley and its contributors.
|
|
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
1995-10-09 07:21:00 +00:00
|
|
|
.\" From: @(#)install.1 8.1 (Berkeley) 6/6/93
|
1999-08-28 01:08:13 +00:00
|
|
|
.\" $FreeBSD$
|
1994-05-27 12:33:43 +00:00
|
|
|
.\"
|
2001-05-28 16:41:53 +00:00
|
|
|
.Dd May 7, 2001
|
1994-05-27 12:33:43 +00:00
|
|
|
.Dt INSTALL 1
|
2001-05-28 16:41:53 +00:00
|
|
|
.Os
|
1994-05-27 12:33:43 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm install
|
|
|
|
.Nd install binaries
|
|
|
|
.Sh SYNOPSIS
|
2000-11-20 19:21:22 +00:00
|
|
|
.Nm
|
2001-05-28 16:41:53 +00:00
|
|
|
.Op Fl bCcMpSsv
|
|
|
|
.Op Fl B Ar suffix
|
1994-05-27 12:33:43 +00:00
|
|
|
.Op Fl f Ar flags
|
|
|
|
.Op Fl g Ar group
|
|
|
|
.Op Fl m Ar mode
|
|
|
|
.Op Fl o Ar owner
|
|
|
|
.Ar file1 file2
|
2000-11-20 19:21:22 +00:00
|
|
|
.Nm
|
2001-05-28 16:41:53 +00:00
|
|
|
.Op Fl bCcMpSsv
|
|
|
|
.Op Fl B Ar suffix
|
1994-05-27 12:33:43 +00:00
|
|
|
.Op Fl f Ar flags
|
|
|
|
.Op Fl g Ar group
|
|
|
|
.Op Fl m Ar mode
|
|
|
|
.Op Fl o Ar owner
|
2001-05-30 09:45:47 +00:00
|
|
|
.Ar file1 ... fileN directory
|
2000-11-20 19:21:22 +00:00
|
|
|
.Nm
|
1996-09-29 06:29:54 +00:00
|
|
|
.Fl d
|
1999-12-06 05:01:14 +00:00
|
|
|
.Op Fl v
|
1996-09-29 06:29:54 +00:00
|
|
|
.Op Fl g Ar group
|
|
|
|
.Op Fl m Ar mode
|
|
|
|
.Op Fl o Ar owner
|
2001-05-30 09:45:47 +00:00
|
|
|
.Ar directory ...
|
1994-05-27 12:33:43 +00:00
|
|
|
.Sh DESCRIPTION
|
2001-05-30 09:45:47 +00:00
|
|
|
The file(s) are copied
|
|
|
|
to the target file or directory.
|
1994-05-27 12:33:43 +00:00
|
|
|
If the destination is a directory, then the
|
|
|
|
.Ar file
|
2001-05-30 09:45:47 +00:00
|
|
|
is copied into
|
1994-05-27 12:33:43 +00:00
|
|
|
.Ar directory
|
|
|
|
with its original filename.
|
2001-05-28 16:41:53 +00:00
|
|
|
If the target file already exists, it is
|
|
|
|
either renamed to
|
|
|
|
.Ar file Ns Pa .old
|
|
|
|
if the
|
|
|
|
.Fl b
|
|
|
|
option is given
|
|
|
|
or overwritten
|
|
|
|
if permissions allow.
|
|
|
|
An alternate backup suffix may be specified via the
|
|
|
|
.Fl B
|
|
|
|
option's argument.
|
1994-05-27 12:33:43 +00:00
|
|
|
.Pp
|
2001-05-28 16:41:53 +00:00
|
|
|
The options are as follows:
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Fl b
|
|
|
|
Back up any existing files before overwriting them by renaming
|
|
|
|
them to
|
|
|
|
.Ar file Ns Pa .old .
|
|
|
|
See
|
|
|
|
.Fl B
|
|
|
|
for specifying a different backup suffix.
|
|
|
|
.It Fl B Ar suffix
|
|
|
|
Use
|
|
|
|
.Ar suffix
|
|
|
|
as the backup suffix if
|
|
|
|
.Fl b
|
|
|
|
is given.
|
1996-03-11 03:31:51 +00:00
|
|
|
.It Fl C
|
2001-05-28 16:41:53 +00:00
|
|
|
Copy the file.
|
|
|
|
If the target file already exists and the files are the same,
|
1996-03-11 03:31:51 +00:00
|
|
|
then don't change the modification time of the target.
|
1994-05-27 12:33:43 +00:00
|
|
|
.It Fl c
|
|
|
|
Copy the file.
|
2001-05-28 16:41:53 +00:00
|
|
|
This is actually the default.
|
|
|
|
The
|
|
|
|
.Fl c
|
|
|
|
option is only included for backwards compatibility.
|
1996-09-29 06:29:54 +00:00
|
|
|
.It Fl d
|
2001-05-28 16:41:53 +00:00
|
|
|
Create directories.
|
1996-09-29 06:29:54 +00:00
|
|
|
Missing parent directories are created as required.
|
1994-05-27 12:33:43 +00:00
|
|
|
.It Fl f
|
1997-08-27 06:29:23 +00:00
|
|
|
Specify the target's file flags; see
|
1994-05-27 12:33:43 +00:00
|
|
|
.Xr chflags 1
|
1997-08-27 06:29:23 +00:00
|
|
|
for a list of possible flags and their meanings.
|
1994-05-27 12:33:43 +00:00
|
|
|
.It Fl g
|
2000-03-01 12:20:22 +00:00
|
|
|
Specify a group.
|
|
|
|
A numeric GID is allowed.
|
1998-01-11 11:43:36 +00:00
|
|
|
.It Fl M
|
|
|
|
Disable all use of
|
|
|
|
.Xr mmap 2 .
|
1994-05-27 12:33:43 +00:00
|
|
|
.It Fl m
|
|
|
|
Specify an alternate mode.
|
|
|
|
The default mode is set to rwxr-xr-x (0755).
|
|
|
|
The specified mode may be either an octal or symbolic value; see
|
2001-05-28 16:41:53 +00:00
|
|
|
.Xr chmod 1
|
1994-05-27 12:33:43 +00:00
|
|
|
for a description of possible mode values.
|
|
|
|
.It Fl o
|
2000-03-01 12:20:22 +00:00
|
|
|
Specify an owner.
|
|
|
|
A numeric UID is allowed.
|
1995-10-09 07:21:00 +00:00
|
|
|
.It Fl p
|
|
|
|
Preserve the modification time.
|
|
|
|
Copy the file, as if the
|
|
|
|
.Fl C
|
2001-05-28 16:41:53 +00:00
|
|
|
(compare and copy) option is specified,
|
1995-10-09 07:21:00 +00:00
|
|
|
except if the target file doesn't already exist or is different,
|
|
|
|
then preserve the modification time of the file.
|
2001-05-28 16:41:53 +00:00
|
|
|
.It Fl S
|
|
|
|
Safe copy.
|
|
|
|
Normally,
|
|
|
|
.Nm
|
|
|
|
unlinks an existing target before installing the new file.
|
|
|
|
With the
|
|
|
|
.Fl S
|
|
|
|
flag a temporary file is used and then renamed to be
|
|
|
|
the target.
|
|
|
|
The reason this is safer is that if the copy or
|
|
|
|
rename fails, the existing target is left untouched.
|
1994-05-27 12:33:43 +00:00
|
|
|
.It Fl s
|
2001-05-28 16:41:53 +00:00
|
|
|
.Nm
|
1994-05-27 12:33:43 +00:00
|
|
|
exec's the command
|
2001-05-28 16:41:53 +00:00
|
|
|
.Xr strip 1
|
|
|
|
to strip binaries so that
|
|
|
|
.Nm
|
|
|
|
can be portable over a large
|
1994-05-27 12:33:43 +00:00
|
|
|
number of systems and binary types.
|
1999-12-06 05:01:14 +00:00
|
|
|
.It Fl v
|
2001-08-21 15:59:55 +00:00
|
|
|
Cause
|
1999-12-06 05:01:14 +00:00
|
|
|
.Nm
|
2001-08-21 15:59:55 +00:00
|
|
|
to be verbose,
|
|
|
|
showing files as they are installed or backed up.
|
1994-05-27 12:33:43 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
By default,
|
1997-08-27 06:29:23 +00:00
|
|
|
.Nm
|
2001-05-28 16:41:53 +00:00
|
|
|
preserves all file flags, with the exception of the
|
|
|
|
.Dq nodump
|
|
|
|
flag.
|
1994-05-27 12:33:43 +00:00
|
|
|
.Pp
|
|
|
|
The
|
1997-08-27 06:29:23 +00:00
|
|
|
.Nm
|
1994-05-27 12:33:43 +00:00
|
|
|
utility attempts to prevent moving a file onto itself.
|
|
|
|
.Pp
|
|
|
|
Installing
|
|
|
|
.Pa /dev/null
|
|
|
|
creates an empty file.
|
2000-03-26 15:06:46 +00:00
|
|
|
.Sh DIAGNOSTICS
|
2001-10-23 00:47:27 +00:00
|
|
|
.Ex -std
|
1995-10-09 07:21:00 +00:00
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width INS@XXXX -compact
|
|
|
|
.It Pa INS@XXXX
|
2001-05-28 16:41:53 +00:00
|
|
|
If either
|
|
|
|
.Fl S
|
|
|
|
option is specified, or the
|
1995-10-09 07:21:00 +00:00
|
|
|
.Fl C
|
|
|
|
or
|
|
|
|
.Fl p
|
2001-05-28 16:41:53 +00:00
|
|
|
option is used in conjuction with the
|
|
|
|
.Fl s
|
|
|
|
option, temporary files named
|
|
|
|
.Pa INS@XXXX ,
|
|
|
|
where
|
|
|
|
.Pa XXXX
|
|
|
|
is decided by
|
1995-10-09 07:21:00 +00:00
|
|
|
.Xr mkstemp 3 ,
|
|
|
|
are created in the target directory.
|
2000-12-19 16:00:12 +00:00
|
|
|
.El
|
2001-05-30 09:45:47 +00:00
|
|
|
.Sh COMPATIBILITY
|
|
|
|
Historically
|
|
|
|
.Nm
|
|
|
|
moved files by default.
|
|
|
|
The default was changed to copy in
|
|
|
|
.Fx 4.4 .
|
1994-05-27 12:33:43 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr chflags 1 ,
|
|
|
|
.Xr chgrp 1 ,
|
|
|
|
.Xr chmod 1 ,
|
|
|
|
.Xr cp 1 ,
|
|
|
|
.Xr mv 1 ,
|
|
|
|
.Xr strip 1 ,
|
1998-01-11 11:43:36 +00:00
|
|
|
.Xr mmap 2 ,
|
1994-05-27 12:33:43 +00:00
|
|
|
.Xr chown 8
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
1997-08-27 06:29:23 +00:00
|
|
|
.Nm
|
1994-05-27 12:33:43 +00:00
|
|
|
utility appeared in
|
|
|
|
.Bx 4.2 .
|
1995-10-09 07:21:00 +00:00
|
|
|
.Sh BUGS
|
|
|
|
Temporary files may be left in the target directory if
|
1997-08-27 06:29:23 +00:00
|
|
|
.Nm
|
1995-10-09 07:21:00 +00:00
|
|
|
exits abnormally.
|
1998-06-02 12:00:08 +00:00
|
|
|
.Pp
|
|
|
|
File flags cannot be set by
|
1998-06-10 07:17:59 +00:00
|
|
|
.Xr fchflags 2
|
2002-05-16 02:19:14 +00:00
|
|
|
over a NFS filesystem. Other filesystems do not have a concept of flags.
|
2002-04-20 12:18:28 +00:00
|
|
|
The
|
1998-06-02 12:00:08 +00:00
|
|
|
.Nm
|
2002-05-16 02:19:14 +00:00
|
|
|
utility will only warn when flags could not be set on a filesystem
|
1998-06-02 12:00:08 +00:00
|
|
|
that does not support them.
|
1999-12-06 05:01:14 +00:00
|
|
|
.Pp
|
2002-04-20 12:18:28 +00:00
|
|
|
The
|
1999-12-06 05:01:14 +00:00
|
|
|
.Nm
|
2002-04-20 12:18:28 +00:00
|
|
|
utility with
|
1999-12-06 05:01:14 +00:00
|
|
|
.Fl v
|
|
|
|
falsely says a file is copied when
|
|
|
|
.Fl C
|
|
|
|
snaps hard links.
|