LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-02-2007, 12:40 PM   #1
rsashok
Member
 
Registered: Nov 2006
Location: USA, CA
Distribution: RedHat, Debian
Posts: 202

Rep: Reputation: 31
Difference between 'install' and 'cp'


I can't figure out what is the major difference between 'install' and 'cp' commands. Besides few options, what is preferred use one versus another?
 
Old 04-02-2007, 12:45 PM   #2
traene
Member
 
Registered: Jan 2005
Distribution: Archlinux, Debian, Centos
Posts: 222

Rep: Reputation: 35
Not an export in this issues. But install can replace a binary, while it is still in use. I think install is preferred when doing packet management (upgrading of installed packets, ie. RedHat uses rpm, debian apt-get and arch pacman -- these will have rules using install, instead of cp)

cp can be used for standard file handling issues.
 
Old 04-02-2007, 12:49 PM   #3
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
The main diffrence: install can change permissions of the copied files, cp can not. This saves a extra command, and install is usually used to install files, as its a task that requires setting of proper permissions of the newly installed files.

Use cp unless you have good reason not to, odds are, you dont need to use install.
 
Old 04-02-2007, 02:59 PM   #4
General Failure
Member
 
Registered: Jan 2007
Location: Germany
Distribution: Slackware 13.37
Posts: 387

Rep: Reputation: 37
And cp is two keystrokes, install is... erm... many
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where i can get source code of the 'cp' command? chaits Linux - General 5 11-22-2010 09:50 PM
What does 'cp' do in this case? unholy Linux - General 3 01-04-2007 09:12 PM
'cp' and 'rm' don't act upon hidden files? Rodolfo Medina Linux - General 2 09-26-2005 06:18 AM
'cp' command error Micro420 Linux - Newbie 2 12-21-2003 03:51 PM
High CPU usage and lag when using 'cp' homestead1000 Linux - Software 1 07-19-2003 12:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration