Can `mkdir -p` overwrite existing directories?

No, the mkdir -p command does not overwrite existing directories. If the specified directory already exists, mkdir -p will simply do nothing for that directory and will not raise an error. It will only create the parent directories that do not exist.

In summary, mkdir -p is safe to use as it will not affect existing directories.

0 Comments

no data
Be the first to share your comment!