LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mkdir : cannot create directory : no such file or directory (http://www.linuxquestions.org/questions/linux-newbie-8/mkdir-cannot-create-directory-no-such-file-or-directory-725720/)

patcheezy 05-13-2009 11:46 AM

mkdir : cannot create directory : no such file or directory
 
uname -a

2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:19 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

trying to create a directory. Getting the following error.

mkdir : cannot create directory '/u07/oradata/AMPUAT' : no such file or directory

any ideas? Which log could I look at for this type of error? Thanks in advance.

repo 05-13-2009 11:48 AM

Quote:

mkdir : cannot create directory '/u07/oradata/AMPUAT' : no such file or directory
does
Code:

/u07/oradata/
exist ?

forrestt 05-13-2009 11:49 AM

The parent directory /u07 or /u07/oradata doesn't exist. Try using the -p option of mkdir to make parents as needed:
Code:

mkdir -p /u07/oradata/AMPUAT
HTH

Forrest

patcheezy 05-13-2009 11:57 AM

Do i have to use -p? I remember on on other server not using -p and it worked. Could it be becuase of the version. Thanks for the info.

repo 05-13-2009 11:59 AM

Quote:

Do i have to use -p? I remember on on other server not using -p and it worked. Could it be becuase of the version. Thanks for the info.
because
/u07 and /u07/oradata
already exist on the other server

forrestt 05-13-2009 12:02 PM

You don't need the -p if the directory /u07/oradata already exists. However, if it does not exist, and you don't use the -p option, you will get the error you are seeing because the "file or directory" /u07/oradata does not exist. If you use the -p option and the parent directory isn't there, it won't complain, but instead make the parent directory and then make the directory. If the parent directory IS there, it will just make the directory. If you didn't need the -p option on the other server, then I would guess that on the other server /u07/oradata already existed when you ran the command to make /u07/oradata/AMPUAT.

HTH

Forrest

patcheezy 05-13-2009 12:26 PM

thanks for your help


All times are GMT -5. The time now is 09:00 AM.