ls는 삭제된 디렉토리에서 inode 정보를 어디에서 얻습니까?

ls는 삭제된 디렉토리에서 inode 정보를 어디에서 얻습니까?

다음 동작을 이해할 수 없습니다: ls디렉토리 생성cda/b/c

$ mkdir a/b/c -p
$ ls -lhRai
.:
total 324K
24512531 drwxrwxr-x  3 mayank mayank 312K May 22 16:23 .
24380771 drwxr-xr-x 34 mayank mayank 4.0K May 22 15:14 ..
25690305 drwxrwxr-x  3 mayank mayank 4.0K May 22 16:23 a

./a:
total 324K
25690305 drwxrwxr-x 3 mayank mayank 4.0K May 22 16:23 .
24512531 drwxrwxr-x 3 mayank mayank 312K May 22 16:23 ..
25690306 drwxrwxr-x 3 mayank mayank 4.0K May 22 16:23 b

./a/b:
total 12K
25690306 drwxrwxr-x 3 mayank mayank 4.0K May 22 16:23 .
25690305 drwxrwxr-x 3 mayank mayank 4.0K May 22 16:23 ..
25690307 drwxrwxr-x 2 mayank mayank 4.0K May 22 16:23 c

./a/b/c:
total 8.0K
25690307 drwxrwxr-x 2 mayank mayank 4.0K May 22 16:23 .
25690306 drwxrwxr-x 3 mayank mayank 4.0K May 22 16:23 ..

cd가장 안쪽 디렉토리로 이동c

$ cd a/b/c

다른 터미널에서 디렉토리를 삭제하십시오 a. 즉,

$ rm -rf a

하지만 ls여전히 얻을인덱스 노드정보

$ pwd
/home/mayank/Tmp/a/b/c
$ ls -lai .
total 0
$ ls -laid .
25690307 drwxrwxr-x 0 mayank mayank 0 May 22 16:23 .
$ ls -laid 
25690307 drwxrwxr-x 0 mayank mayank 0 May 22 16:23 .
$ ls -laid ../
25690306 drwxrwxr-x 0 mayank mayank 0 May 22 16:24 ../
$ ls -laid ../..
25690305 drwxrwxr-x 0 mayank mayank 0 May 22 16:24 ../..
$ ls -laid ../../..
24512531 drwxrwxr-x 2 mayank mayank 319488 May 22 16:24 ../../..

Bash의 offcourse cwd파일은 /proc삭제된 디렉터리를 가리킵니다.

$ ls -l /proc/$$/cwd
lrwxrwxrwx 1 mayank mayank 0 May 22 16:32 /proc/13125/cwd -> /home/mayank/Tmp/a/b/c (deleted)

또한 cd행동을 이해하지 못함

$ cd ..
cd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory    
$ ls -li
total 0
$ ls -lid
25690306 drwxrwxr-x 0 mayank mayank 0 May 22 16:24 .
$ pwd
/home/mayank/Tmp/a/b/c/..
$ cd ..
cd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
$ pwd
/home/mayank/Tmp/a/b/c/../..
$ ls -lhid
25690305 drwxrwxr-x 0 mayank mayank 0 May 22 16:24 .
$ cd ..    
Tmp:$ ls -lhtrai
total 320K
24380771 drwxr-xr-x 34 mayank mayank 4.0K May 22 15:14 ..
24512531 drwxrwxr-x  2 mayank mayank 312K May 22 16:24 .
Tmp:$ cd -
bash: cd: /home/mayank/Tmp/a/b/c/../..: No such file or directory

cd상위 디렉터리 정보를 가져올 수 c b없지만a

관련 정보