加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

bash – `-rw-r – r – @`中的@在`ls -l`输出中是什么意思?

发布时间:2020-12-15 18:23:06 所属栏目:安全 来源:网络整理
导读:我在Mac OS X上用bash完成文件夹检查ls -l输出 $ls -alrth /usr/local/etc/bash_completion.d/docker-machine* -rw-r--r--@ 1 abhimskywalker staff 1.4K Jun 13 19:04 /usr/local/etc/bash_completion.d/docker-machine-prompt.bash-rw-r--r--@ 1 abhimskyw
我在Mac OS X上用bash完成文件夹检查ls -l输出
$ls -alrth /usr/local/etc/bash_completion.d/docker-machine* 
-rw-r--r--@ 1 abhimskywalker  staff   1.4K Jun 13 19:04 /usr/local/etc/bash_completion.d/docker-machine-prompt.bash
-rw-r--r--@ 1 abhimskywalker  staff   1.5K Jun 13 19:36 /usr/local/etc/bash_completion.d/docker-machine-wrapper.bash
-rw-r--r--@ 1 abhimskywalker  staff   6.8K Jun 13 19:37 /usr/local/etc/bash_completion.d/docker-machine.bash

我无法理解这个@在-rw-r – r – @中是什么意思?

它表示该文件具有 extended attributes.您可以使用xattr命令行实用程序来查看和修改它们:
xattr -l file # lists the names of all xattrs.
xattr -w attr_name attr_value file # sets xattr attr_name to attr_value.
xattr -d attr_name file # deletes xattr attr_name.
xattr -c file # deletes all xattrs.
xattr -h # prints help

您还可以使用ls -l @查看有关这些扩展属性的更多信息.

从osx ls手册页:

The Long Format
If the file or directory has extended attributes,the permissions field printed by the -l option is followed by an @ character. Otherwise,if the file or directory has extended security information,the permissions field printed by the -l option is followed by a + character.

-@ Display extended attribute keys and sizes in long (-l) output.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读