확장 된 속성과 방법을 모두 표시 / 표시 할 수 있습니까?
확장 된 속성과 방법을 모두 표시 / 표시 할 수 있습니까?
답변:
Linux에서 파일 확장 속성을 보는 파일 시스템 명령과 독립적
getfattr -d -m ".*" <filename>
마지막으로 Selinux 속성을 보여줍니다.
getfattr -d <filename>
user. * 속성 만 표시하십시오.
모든 확장 된 속성을 나열하는 명령은 ls -l@
입니다.
예 (내 맥에서는 linux / BSD가 다르게 보일 것입니다) :
felixphew-mbp:/ felixphew$ ls -l@
total 45
drwxrwxr-x+ 63 root admin 2142 27 Dec 17:49 Applications
drwxr-xr-x+ 62 root wheel 2108 16 Nov 06:25 Library
drwxr-xr-x@ 2 root wheel 68 10 Sep 06:47 Network
com.apple.FinderInfo 32
drwxr-xr-x+ 4 root wheel 136 1 Nov 14:02 System
drwxr-xr-x 6 root admin 204 28 Dec 07:36 Users
drwxrwxrwt@ 3 root admin 102 30 Dec 06:40 Volumes
com.apple.FinderInfo 32
drwxr-xr-x@ 39 root wheel 1326 11 Nov 07:06 bin
com.apple.FinderInfo 32
drwxrwxr-t@ 2 root admin 68 10 Sep 06:47 cores
com.apple.FinderInfo 32
dr-xr-xr-x 3 root wheel 4306 30 Dec 06:40 dev
lrwxr-xr-x@ 1 root wheel 11 1 Nov 13:56 etc -> private/etc
com.apple.FinderInfo 32
dr-xr-xr-x 2 root wheel 1 30 Dec 06:40 home
-rw-r--r--@ 1 root wheel 313 1 Oct 16:12 installer.failurerequests
com.apple.FinderInfo 32
dr-xr-xr-x 2 root wheel 1 30 Dec 06:40 net
drwxr-xr-x@ 3 root wheel 102 12 Aug 07:19 opt
com.apple.FinderInfo 32
drwxr-xr-x@ 6 root wheel 204 1 Nov 14:05 private
com.apple.FinderInfo 32
drwxr-xr-x@ 59 root wheel 2006 18 Nov 07:46 sbin
com.apple.FinderInfo 32
drwxr-xr-x@ 3 root wheel 102 22 Dec 07:46 srv
com.apple.FinderInfo 32
lrwxr-xr-x@ 1 root wheel 11 1 Nov 13:57 tmp -> private/tmp
com.apple.FinderInfo 32
drwxr-xr-x@ 13 root wheel 442 23 Nov 11:20 usr
com.apple.FinderInfo 32
lrwxr-xr-x@ 1 root wheel 11 1 Nov 13:57 var -> private/var
com.apple.FinderInfo 32
같은 디렉토리 ls -l
:
felixphew-mbp:/ felixphew$ ls -l
total 45
drwxrwxr-x+ 63 root admin 2142 27 Dec 17:49 Applications
drwxr-xr-x+ 62 root wheel 2108 16 Nov 06:25 Library
drwxr-xr-x@ 2 root wheel 68 10 Sep 06:47 Network
drwxr-xr-x+ 4 root wheel 136 1 Nov 14:02 System
drwxr-xr-x 6 root admin 204 28 Dec 07:36 Users
drwxrwxrwt@ 3 root admin 102 30 Dec 06:40 Volumes
drwxr-xr-x@ 39 root wheel 1326 11 Nov 07:06 bin
drwxrwxr-t@ 2 root admin 68 10 Sep 06:47 cores
dr-xr-xr-x 3 root wheel 4306 30 Dec 06:40 dev
lrwxr-xr-x@ 1 root wheel 11 1 Nov 13:56 etc -> private/etc
dr-xr-xr-x 2 root wheel 1 30 Dec 06:40 home
-rw-r--r--@ 1 root wheel 313 1 Oct 16:12 installer.failurerequests
dr-xr-xr-x 2 root wheel 1 30 Dec 06:40 net
drwxr-xr-x@ 3 root wheel 102 12 Aug 07:19 opt
drwxr-xr-x@ 6 root wheel 204 1 Nov 14:05 private
drwxr-xr-x@ 59 root wheel 2006 18 Nov 07:46 sbin
drwxr-xr-x@ 3 root wheel 102 22 Dec 07:46 srv
lrwxr-xr-x@ 1 root wheel 11 1 Nov 13:57 tmp -> private/tmp
drwxr-xr-x@ 13 root wheel 442 23 Nov 11:20 usr
lrwxr-xr-x@ 1 root wheel 11 1 Nov 13:57 var -> private/var
@
에 지정된 인수는 ls
입니다 invalid option
에 리눅스. @
옵션을 찾았는데 이것은 mac OS-X에만 해당됩니다. 이 질문은 리눅스에만 해당됩니다.
getfattr -d -m ^ -R -- <filename or directory>