Re: 'ls' caching?

From: Kirk Strauser (kirk_at_strauser.com)
Date: 12/22/04

  • Next message: Jonathan Kaye: "Re: aptitude: modifying sources.list"
    To: debian-user@lists.debian.org
    Date: Wed, 22 Dec 2004 10:02:06 -0600
    
    
    

    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
    
    

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    


  • Next message: Jonathan Kaye: "Re: aptitude: modifying sources.list"