What, precisely, is the difference in what is being performed by mkdir -p and install -d, in terms of what changes the two commands are doing to the system?
What's the difference between `mkdir -p` and `install -d`?
c;coreutils
mkdir -p and install -d in coreutils both use the exact same make_dir_parents function.However, install -d will call make_dir_parents with preserve_existing set to true, while mkdir -p will call make_dir_parents with preserve_existing set to false.If preserve_existing is true and the directory already exists, the function will not attempt to set the ownership and file mode bits.The main difference between mkdir -p and install -d is that if the directory already exists, only mkdir -p will try to set the ownership and file mode bits.