ls -al은 횡설수설을 던집니다. 소유권이 보이지 않고 모두 심문으로 대체됩니까? 상징

ls -al은 횡설수설을 던집니다. 소유권이 보이지 않고 모두 심문으로 대체됩니까? 상징

명령을 사용할 때 오류가 발생하면 ls -al /xx문자가 깨집니다. 소유권, 권한을 복사하고 수정하려고 시도했지만 아무것도 변경되지 않았습니다. 이는 루트와 사용자에게도 발생합니다. apt install systemd-sysvsysv 모드에서 systemd()를 실행 중입니다 . 초기화 교체로. 정의할 수가 없어요, 그게 어디죠? ? ? 에서.

$ ls -al /xbin    
d????????? ? ? ? ? ? .
d????????? ? ? ? ? ? ..
d????????? ? ? ? ? ? ADMIN
-????????? ? ? ? ? ? apt-commands.sh
-????????? ? ? ? ? ? build-kernel.sh
-????????? ? ? ? ? ? cairo-dock.sh
-????????? ? ? ? ? ? chrome.sh
-????????? ? ? ? ? ? dirwatch.sh
-????????? ? ? ? ? ? export_notebook.sh
-????????? ? ? ? ? ? find_duplicates.sh
-????????? ? ? ? ? ? findsortdate.sh
-????????? ? ? ? ? ? functions.sh
-????????? ? ? ? ? ? get-chromium.sh
-????????? ? ? ? ? ? get-kernel.sh
d????????? ? ? ? ? ? .git
-????????? ? ? ? ? ? github-create.sh

확장된 속성과 관련이 있나요?

답변1

lswith -l/ -n... ?는 디렉토리의 내용을 나열할 수 있지만 그 안에 있는 파일의 메타데이터를 검색할 수 없는 경우( lstat()또는 (with -L) stat시스템 호출 또는 this 와 같은 변형을 사용하여) statx()이러한 내용을 표시합니다 .

일반적인 상황은 다음과 같습니다.읽다허용( r)하지만 허용하지 않음찾다x디렉터리에 대한 권한( ). 이러한 경우 stat*()시스템 호출은 EACCESS(허가가 거부되었습니다).

$ mkdir dir
$ touch dir/{1,2}
$ chmod u=r,go= dir
$ ls -la dir
ls: cannot access 'dir/1': Permission denied
ls: cannot access 'dir/..': Permission denied
ls: cannot access 'dir/2': Permission denied
ls: cannot access 'dir/.': Permission denied
total 0
d????????? ? ? ? ?            ? ./
d????????? ? ? ? ?            ? ../
-????????? ? ? ? ?            ? 1
-????????? ? ? ? ?            ? 2

디렉토리에 존재하지 않는 inode를 참조하는 항목이 포함되어 있는 경우 파일 시스템 손상으로 인해 다른 상황이 발생할 수 있습니다.

다음을 사용하여 ls -lL끊어진 심볼릭 링크를 볼 수 있습니다.

$ ln -s /broken .
$ ln -s broken2 broken2
$ ls -lL
ls: cannot access 'broken2': Too many levels of symbolic links
ls: cannot access 'broken': No such file or directory
total 0
l????????? ? ? ? ?            ? broken
l????????? ? ? ? ?            ? broken2

관련 정보