fortypoundhead.com

INSTALL

Posted On 2007-05-01 by FortyPoundHead
Keywords: Command Reference
Tags: Linux Commandline Linux
Views: 1427


Copy files and set attributes, copies files while setting their permission modes and, if possible, their owner and group.

SYNTAX
install [options]... SOURCE DEST

install [options]... SOURCE... DIRECTORY

install -d [options]... DIRECTORY...

DESCRIPTION
The 3 variants above install either a single SOURCE file to DEST target or copy multiple SOURCE files to the destination. In the last variant,
each DIRECTORY (and any missing parent directories) is created.

`install'' is similar to `cp'', but allows you to control the attributes of destination files. It is typically used in Makefiles to
copy programs into their destination directories. It refuses to copy files onto themselves.

OPTIONS

-b
--backup
Make a backup of each file that would otherwise be overwritten or removed. *Note Backup options::.

-C
Install file, unless target already exists and is the same file, in which case the modification time is not changed.

-c
Ignored; for compatibility with old Unix versions of `install''.

-d
--directory
Create each given directory and any missing parent directories, setting the owner, group and mode as given on the command line or to the defaults. It also gives any parent directories it creates those attributes. (This is different from the SunOS 4.x `install'', which gives directories that it creates the default attributes.)

-g GROUP
--group=GROUP
Set the group ownership of installed files or directories to GROUP. The default is the process''s current group. GROUP may be either a group name or a numeric group id.

-m MODE
--mode=MODE
Set the permissions for the installed file or directory to MODE, which can be either an octal number, or a symbolic mode as in `chmod'', with 0 as the point of departure (*note File permissions::). The default mode is 0755--read, write, and execute for the owner, and read and execute for group and other.

-o OWNER
--owner=OWNER
If `install'' has appropriate privileges (is run as root), set the ownership of installed files or directories to OWNER. The default is `root''. OWNER may be either a user name or a numeric user ID.

-p
--preserve-timestamps
Set the time of last access and the time of last modification of each installed file to match those of each corresponding original file. When a file is installed without this option, its last access and last modification times are both set to the time of installation. This option is useful if you want to use the last modification times of installed files to keep track of when they were last built as opposed to when they were last installed.

-s
--strip
Strip the symbol tables from installed binary executables.

-S SUFFIX
--suffix=SUFFIX
Append SUFFIX to each backup file made with `-b''.

-v
--verbose
Print the name of each file before copying it.

-V METHOD
--version-control=METHOD
Change the type of backups made with `-b''. The METHOD argument can be `numbered'' (or `t''), `existing'' (or `nil''), or `never'' (or `simple'').


About the Author

FortyPoundHead has posted a total of 1974 articles.

 


Comments On This Post

No comments on this post yet!


Do you have a thought relating to this post? You can post your comment here. If you have an unrelated question, you can use the Q&A section to ask it.

Or you can drop a note to the administrators if you're not sure where you should post.


Your IP address is:54.80.58.75

Before you can post, you need to prove you are human. If you log in, this test goes away.



Recent Forum Posts

List of Shady Characters
dwirch posted on April 25, 2017 at about 16:39 in Webmaster Stuff

Job Spammer: Bilal Uddin
dwirch posted on April 25, 2017 at about 11:00 in Spammers

Bug Fix: Contact Form Error
dwirch posted on April 21, 2017 at about 11:38 in Site News

Bug Fix: Ophion Time Tracker
dwirch posted on April 9, 2017 at about 11:30 in Site News

Job Spammer: Yogesh Kapadne
dwirch posted on March 31, 2017 at about 8:04 in Spammers

Job Spammer: Sathya Narayana
dwirch posted on March 15, 2017 at about 7:18 in Spammers