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

Re: problem with invisible/disappearing files - but inodes there

On Mon, 2004-07-05 at 16:52, invader_zim@cia.com.au wrote:
> Hi,
> We have an unusual problem with 'invisible' and disappearing files: some files are not
> visible in a directory using 'find' or 'ls' on the directory, yet they
> are visible using tools such as 'debugfs' or if you know the actual name
> of the file, you can use 'ls' to list it explicitly.
> For instance, in the directory:
> /home/stampy/queues/sendsyphonemailqstore/q_dispatch
> you can ls -la it, and find no files:
> stampy:~# ls -la /home/stampy/queues/sendsyphonemailqstore/q_dispatch
> total 8
> drwxr-sr-x    2 louisb   staff        4096 Jun 25 11:45 .
> drwxr-sr-x    7 louisb   staff        4096 Jan  4 14:05 ..
> Yet when you 'ls' the files directly (which we find from the log of a
> daemon that places them there), they are there:
> stampy:~# ls -la
> /home/stampy/queues/sendsyphonemailqstore/q_dispatch/1088004896841
> -rw-r--r--    1 louisb   staff           1 Jun 24 01:34
> /home/stampy/queues/sendsyphonemailqstore/q_dispatch/1088004896841
> stampy:~#

Very bizarre. I see that when you do an ls, the following line has:
  total 8
So it appears there are actually 8 files in that directory.

Perhaps there is a file with a very strange character in it, which is
causing ls to terminate?

Why not try:
  find q_dispatch -print >/tmp/files.txt
then use "od -cx" to see what is really in that dir listing? Look in
particular for an "empty line", which might indicate a problem.

The "od" program is used to handling any sort of input, so you will
definitely see everything generated by find.

You might also want to try
  rm -i *
to "interactively" select files for deleting. I have found this useful
in the past when a file with a bizarre name needs to be deleted.



Reply to: