bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ls showing deleted file, sorta


From: Jim Meyering
Subject: Re: ls showing deleted file, sorta
Date: Thu, 29 Apr 2004 22:53:35 +0200

Tyler Mitchell <address@hidden> wrote:
> I delete a log file like:
> $ rm /var/log/postmaster.log
>
> Then do:
> $ ls /var/log
> lastlog  postmaster.log  setup.log  setup.log.full  sshd.log
>
> It still shows there, so I check again using:
>
> $ ls /var/log -l
> ls: /var/log/postmaster.log: No such file or directory
> total 365
> -rwxrwxrwx+   1 Administ Domain A  3144744 Apr 28 09:34 lastlog
> -rwxrwxrwx+   1 Administ Domain A    94443 Apr 27 15:13 setup.log
> -rwxrwxrwx+   1 Administ Domain A   211575 Apr 27 15:13 setup.log.full
> -rwxrwxrwx+   1 SYSTEM   Administ      141 Nov 22 11:55 sshd.log
>
> And it's gone!  Hmmm...was it just a timing questions?
>
> $ ls /var/log
> lastlog  postmaster.log  setup.log  setup.log.full  sshd.log
>
> Nope, still shows up when doing a wide listing but not a long listing.
>
> Hope this helps improve the product.  This is Cygwin, Windows 2000.

There may be a problem with your file system.  What type is it?
The first ls (with no options) simply opens one `file' (the directory),
and then prints the names of the entries it finds there.

When you run `ls -l', ls has to call lstat for each file name
that it finds in a directory entry.  The above shows it found
an entry for postmaster.log in the directory, but that the
`lstat ("postmaster.log", ...' call failed with ENOENT.

Since this is Cygwin-related, I suggest you report it to them:

  http://cygwin.com/problems.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]