X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Date: Wed, 7 Apr 2010 23:27:57 -0500 (CDT) From: Tim McDaniel To: cygwin AT cygwin DOT com Subject: Re: Filesystem Filename touch fail [ was: PLEASE TEST YOUR FS ] In-Reply-To: <4BBD3CA9.1090609@gmail.com> Message-ID: References: <1270678042 DOT 14260 DOT 1368807709 AT webmail DOT messagingengine DOT com> <4BBD3CA9 DOT 1090609 AT gmail DOT com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Wed, 7 Apr 2010, Morgan Gangwere wrote: > On 4/7/2010 4:07 PM, Charles Wilson wrote: >> One is a simple shared NTFS drive, I think (volinfo-1.txt). The >> other is a weird distributed filesystem of some kind >> (volinfo-2.txt). > > Both are NTFS unless one is not. > >> $ touch foo. >> touch: cannot touch `foo.': No such file or directory > >> $ touch " foo " >> touch: cannot touch ` foo ': No such file or directory > > Both of those are invalid under NTFS FS specifications: > "Filenames may contain any character other than NULL (0x0000) but > may not contain a space (ASCII 0x20, ' ') or period ('.')" Where did you get that sentence?! Googling found nothing but your e-mail message. That can't possibly be true for NTFS. NTFS takes spaces in directories (C:\Program Files\) and filenames (...\Budget 2009.doc) perfectly well. On a Windows XP system, I just created a file named "C:\download\MySQL\foo bar.baz.txt" just fine: created in Explorer, edited in Notepad, typed in CMD. > Windows in kernel-space defines this restriction (as defined by Wikipedia): > """ > Microsoft Windows: Windows kernel forbids the use of > characters in range 1-31 (i.e., 0x01-0x1F) and characters " * : < > > ? \ / |. ...These restrictions only apply to Windows - Linux, for > example, allows use of " * : < > ? \ / | even in NTFS. Though / cannot be used in _filenames_ in Linux -- it's always a directory delimiter. > Since 'touch foo.' would result in doing an fileopen("foo.") this > would be considered "bad" by Windows AND Linux ( I mounted an NTFS > Partition and tried 'touch foo.' and was denied it) In Linux using a Linux filesystem, it doesn't care in the slightest about periods. In Windows in CMD and Explorer, an attempt to rename "C:\download\MySQL\foo bar baz" to "C:\download\MySQL\foo bar baz." simply caused the trailing "." to be ignored. -- Tim McDaniel, tmcd AT panix DOT com -- 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