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

Re: 'ls' caching?



On Wednesday 22 December 2004 06:37, michael wrote:

> Is there some caching going on for 'ls'?

Not in the sense you mean, no.

> See the example below where I deleted files in another window and then
> re-exported from CVS, but the listing doesn't appear unless I cd out and
> back in again.  

Are you sure that you hadn't deleted and then recreated the vcoord directory 
(and not just its contents)?  If you cded into vcoord and then rm-rf'ed it 
from another window, then you'd get the behavior you described.  Basically, 
your pwd would effectively be a non-existent directory with no contents.  
When you cd out of it and then back in, you're really changing from a 
non-existent directory to one that exists.

This is easy enough to recreate:

  $ cd /tmp
  $ mkdir foo
  $ cd foo
  $ touch bar
  $ touch baz
  $ touch qux

In another shell:

  $ rm -rf /tmp/foo

Back in the original shell:

  $ ls -la
  total 0
  $ pwd
  /tmp/foo
  $ cd $PWD
  cd: no such file or directory: /tmp/foo

-- 
Kirk Strauser

Attachment: pgpIv5jmI1FWC.pgp
Description: PGP signature


Reply to: