Mail Archives: cygwin/2004/01/16/09:28:01
Baurjan Ismagulov <ibr AT ata DOT cs DOT hun DOT edu DOT tr> 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/
- Raw text -