Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 X-WebMail-UserID: pjacklam AT online DOT no Date: Fri, 16 Jan 2004 15:27:44 +0100 From: "Peter J. Acklam" To: Baurjan Ismagulov , cygwin X-EXP32-SerialNo: 50000140 Subject: RE: deleting a file ending with a dot Message-ID: <400863B1@epostleser.online.no> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Baurjan Ismagulov wrote: > > Peter J. Acklam wrote: > > > > ls -1ib DIR # find inode number NUM > > ls: cachedmetrics.: No such file or directory Huh. ls seems to notice that the directory contains a file named something like "cachedmetrics.", but yet it is able to find it. A wild guess is that readdir() finds it, and tells ls that the file exists, but when ls does a stat() on the file, it fails and that's why you get the error. What is the output if you run the following script with the directory as the input argument. It is essentially the same as "ls -b" but no stat() is done. ------------------------------------------------------ #!/usr/bin/env perl use strict; use warnings; my $dir = shift; opendir DIR, $dir or die "$dir: can't open directory: $!\n"; for (readdir DIR) { #s/([^\040-\176\240-\377])/sprintf '\%03o', ord $1/eg; s/([^\040-\176])/sprintf '\%03o', ord $1/eg; print $_, "\n"; } closedir DIR or die "$dir: can't open directory: $!\n"; ------------------------------------------------------ > > But I wonder how you created this file in the first place. > > It seems to me that trailing dots are removed. > > Wow! What are the versions of Windows, cygwin and tar? > I use 2000, 1.3.22, 1.13.25. Windows XP, Cygwin 1.5.5, tar 1.13.25. Peter -- Peter J. Acklam - pjacklam AT online DOT no - http://home.online.no/~pjacklam -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/