public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* mkdir working in command line but not working in csh script
@ 2014-03-20 22:35 Zhihua Liang
  2014-03-20 23:37 ` Larry Hall (Cygwin)
  0 siblings, 1 reply; 4+ messages in thread
From: Zhihua Liang @ 2014-03-20 22:35 UTC (permalink / raw)
  To: cygwin


Hi, All:

mkdir working in command line but not working in csh script, After running csh script, the error message is:

mkdir: cannot create directory '/home/userID/job': No such file or directory

In the command line, mkdir command can create 'job' directory.

What is the possible cause or reason for this in cygwin. I have installed most recent version of cygwin in Windows 7-32 bit system.

Thank you for your help.

ZHL

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mkdir working in command line but not working in csh script
  2014-03-20 22:35 mkdir working in command line but not working in csh script Zhihua Liang
@ 2014-03-20 23:37 ` Larry Hall (Cygwin)
  2014-03-21 20:28   ` Eliot Moss
  0 siblings, 1 reply; 4+ messages in thread
From: Larry Hall (Cygwin) @ 2014-03-20 23:37 UTC (permalink / raw)
  To: cygwin

On 3/20/2014 11:20 AM, Zhihua Liang wrote:
>
> Hi, All:
>
> mkdir working in command line but not working in csh script, After
> running  csh script, the error message is:
>
> mkdir: cannot create directory '/home/userID/job': No such file or directory
>
> In the command line, mkdir command can create 'job' directory.
>
> What is the possible cause or reason for this in cygwin. I have
> installed  most recent version of cygwin in Windows 7-32 bit system.

Unless someone here has seen exactly the same problem, you may not get
much in the way of helpful responses without a more detailed report of
how to recreate the problem (i.e. a script at least).  cygcheck output
would be helpful too.  See the problem reporting guidelines at the link
below for details.

> Problem reports:       http://cygwin.com/problems.html

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mkdir working in command line but not working in csh script
  2014-03-20 23:37 ` Larry Hall (Cygwin)
@ 2014-03-21 20:28   ` Eliot Moss
  2014-03-21 21:47     ` Zhihua Liang
  0 siblings, 1 reply; 4+ messages in thread
From: Eliot Moss @ 2014-03-21 20:28 UTC (permalink / raw)
  To: cygwin

On 3/20/2014 5:44 PM, Larry Hall (Cygwin) wrote:
> On 3/20/2014 11:20 AM, Zhihua Liang wrote:

>> mkdir working in command line but not working in csh script, After
>> running  csh script, the error message is:
>>
>> mkdir: cannot create directory '/home/userID/job': No such file or directory
>>
>> In the command line, mkdir command can create 'job' directory.
>>
>> What is the possible cause or reason for this in cygwin. I have
>> installed  most recent version of cygwin in Windows 7-32 bit system.
>
> Unless someone here has seen exactly the same problem, you may not get
> much in the way of helpful responses without a more detailed report of
> how to recreate the problem (i.e. a script at least).  cygcheck output
> would be helpful too.  See the problem reporting guidelines at the link
> below for details.
>
>> Problem reports:       http://cygwin.com/problems.html

I agree with Larry, but offer a this thought:

Unless you invoke mkdir with -p, it won't create parent directories,
so if /home/userID does not exist, the command will fail, with the error
message you indicated.  If by "command line" you mean using the Windows
command line program CMD.EXE, then its behavior is like mkdir -p, not mkdir.
(Cygwin follows Posix standards on this, on purpose; it does not aim to mimic
cmd.exe!)

If you are talking about bash or csh as your command line, then I do not
have further suggestions without seeing more details.

Regards -- Eliot Moss

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mkdir working in command line but not working in csh script
  2014-03-21 20:28   ` Eliot Moss
@ 2014-03-21 21:47     ` Zhihua Liang
  0 siblings, 0 replies; 4+ messages in thread
From: Zhihua Liang @ 2014-03-21 21:47 UTC (permalink / raw)
  To: moss, cygwin

Eliot, Thank you for your help. After I add option -p after mkdir in csh script, it is working and the target directory is created after I run csh script.

The parent directory of /home/userID/ is already exist before run csh script.
What I mean command line is for enter mkdir command in cygwin terminal after $ sign and it can create directory.
Without -p option the mkdir in csh script cannot create subdirectory /home/userID/jobs
Now with -p option, the nkdir in csh script can create /home/userID/jobs.


Thank you all for your help. Have a great weekend!

ZHL




On Friday, March 21, 2014 12:38 PM, Eliot Moss <moss@cs.umass.edu> wrote:
On 3/20/2014 5:44 PM, Larry Hall (Cygwin) wrote:
> On 3/20/2014 11:20 AM, Zhihua Liang wrote:

>> mkdir working in command line but not working in csh script, After
>> running  csh script, the error message is:
>>
>> mkdir: cannot create directory '/home/userID/job': No such file or directory
>>
>> In the command line, mkdir command can create 'job' directory.
>>
>> What is the possible cause or reason for this in cygwin. I have
>> installed  most recent version of cygwin in Windows 7-32 bit system.
>
> Unless someone here has seen exactly the same problem, you may not get
> much in the way of helpful responses without a more detailed report of
> how to recreate the problem (i.e. a script at least).  cygcheck output
> would be helpful too.  See the problem reporting guidelines at the link
> below for details.
>
>> Problem reports:      http://cygwin.com/problems.html

I agree with Larry, but offer a this thought:

Unless you invoke mkdir with -p, it won't create parent directories,
so if /home/userID does not exist, the command will fail, with the error
message you indicated.  If by "command line" you mean using the Windows
command line program CMD.EXE, then its behavior is like mkdir -p, not mkdir.
(Cygwin follows Posix standards on this, on purpose; it does not aim to mimic
cmd.exe!)

If you are talking about bash or csh as your command line, then I do not
have further suggestions without seeing more details.

Regards -- Eliot Moss


--
Problem reports:      http://cygwin.com/problems.html
FAQ:                  http://cygwin.com/faq/
Documentation:        http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-03-21 20:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-20 22:35 mkdir working in command line but not working in csh script Zhihua Liang
2014-03-20 23:37 ` Larry Hall (Cygwin)
2014-03-21 20:28   ` Eliot Moss
2014-03-21 21:47     ` Zhihua Liang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).