From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7534 invoked by alias); 21 Mar 2014 20:45:26 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 7522 invoked by uid 89); 21 Mar 2014 20:45:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_05,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: nm30-vm3.bullet.mail.ne1.yahoo.com Received: from nm30-vm3.bullet.mail.ne1.yahoo.com (HELO nm30-vm3.bullet.mail.ne1.yahoo.com) (98.138.91.160) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 21 Mar 2014 20:45:24 +0000 Received: from [98.138.100.103] by nm30.bullet.mail.ne1.yahoo.com with NNFMP; 21 Mar 2014 20:45:22 -0000 Received: from [98.138.89.175] by tm102.bullet.mail.ne1.yahoo.com with NNFMP; 21 Mar 2014 20:45:22 -0000 Received: from [127.0.0.1] by omp1031.mail.ne1.yahoo.com with NNFMP; 21 Mar 2014 20:45:22 -0000 Received: (qmail 92597 invoked by uid 60001); 21 Mar 2014 20:45:22 -0000 Received: from [129.207.107.92] by web121202.mail.ne1.yahoo.com via HTTP; Fri, 21 Mar 2014 13:45:22 PDT References: <1395328801.67409.YahooMailNeo@web121201.mail.ne1.yahoo.com> <532B6155.2000003@cygwin.com> <532C78E2.3040906@cs.umass.edu> Message-ID: <1395434722.36086.YahooMailNeo@web121202.mail.ne1.yahoo.com> Date: Fri, 21 Mar 2014 21:47:00 -0000 From: Zhihua Liang Reply-To: Zhihua Liang Subject: Re: mkdir working in command line but not working in csh script To: "moss@cs.umass.edu" , "cygwin@cygwin.com" In-Reply-To: <532C78E2.3040906@cs.umass.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00391.txt.bz2 Eliot, Thank you for your help. After I add option -p after mkdir in csh sc= ript, it is working and the target directory is created after I run csh scr= ipt. The parent directory of /home/userID/ is already exist before run csh scrip= t. What I mean command line is for enter mkdir command in cygwin terminal afte= r $ 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 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=A0 csh script, the error message is: >> >> mkdir: cannot create directory '/home/userID/job': No such file or direc= tory >> >> In the command line, mkdir command can create 'job' directory. >> >> What is the possible cause or reason for this in cygwin. I have >> installed=A0 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).=A0 cygcheck output > would be helpful too.=A0 See the problem reporting guidelines at the link > below for details. > >> Problem reports:=A0 =A0 =A0 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.=A0 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 mim= ic 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:=A0 =A0 =A0 http://cygwin.com/problems.html FAQ:=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http://cygwin.com/faq/ Documentation:=A0 =A0 =A0 =A0 http://cygwin.com/docs.html Unsubscribe info:=A0 =A0 =A0 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