[Proposal] Using install in place of mkdir/cp

Jeremy Utley jeremy at jutley.org
Wed May 12 12:47:02 PDT 2004


Tushar Teredesai wrote:

> Archaic wrote:
>
>> It has been suggested to replace mkdir/chown and cp/chown with
>> install -m (perms). Granted, this is by no means a big deal, but it
>> does lessen the commands typed, as well as teaching the use of
>> another utility. Tush even hinted at it being safer in some cases, but
>> he will have to elaborate on that.
>>  
>>
> install unlinks the old file and installs a new one in its place. So 
> it is safer if the files are in use. This is especially relevant for 
> folks who are using the book instructions to upgrade packages instead 
> of starting from scratch everytime a new version is released.
>
> No need to change the book if it is assumed that everytime there is a 
> package update, the entire system will be rebuilt by the user.
>
> I prefer install rather than mkdir or cp since it allows changing the 
> permissions and ownership at the same time.
>
Well, what we're talking about here is one specific place, that being 
the initial creation of the directory structure in chapter 6.  IMHO, 
it's not really needed there, and it might actually make that set of 
commands more complex, since we'll have a couple of directories that 
won't be able to be included in the {} expansion.

-J-




More information about the lfs-dev mailing list