What is the difference (is there any?) between sudo install -c -o %username% binaryfile usr/local/bin and just moving binary file to usr/local/bin?

  • Read the man page for install! – user3439894 Apr 14 '17 at 0:33
  • What Mac model and OS version are you doing this on? What directory are you in when you run the command? Did you really want to install into usr/local/bin and not /usr/local/bin with the preceding /? Does the directory exist on the computer? – D A Vincent Apr 14 '17 at 7:02

When you use install, it will copy a file to it's destination, while mv changes the directory listing and is atomic. When you move a file from one file system to another then mv is not atomic and will copy the file to the other file system then remove the source file. Obviously, mv and install have different options with install offering you more fine grain choices.

  • Could you please explain the use of the word "atomic" in your answer? – user3439894 Apr 14 '17 at 14:25
  • @user3439894- atomic in the context that if the user has the proper access to the source and destination, the operation can not be interrupted. Thus the operation is guaranteed. I 'm burning in a new computer and don't have access to all the man pages yet, but I think that rename(2) and atomic(3) contain information. – fd0 Apr 15 '17 at 16:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .