I have a directory name foo
located in ~/Desktop
. Suppose I want to create a directory from a terminal with same name and in the same location. When I tried mkdir
it gave an error:
mkdir: cannot create directory `/home/nux/Desktop/foo': File exists
Thats makes sense, but I want to replace foo
if exists. I looked through man mkdir
but there isn't any option that do that.
So how to overwrite foo
directory?
Why doesn't mkdir
have an option to do this?