Install binary file != move binary to path folder

command lineinstall

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?

Best Answer

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.