gpt4 book ai didi

Linux ls 显示黄色背景的文件

转载 作者:太空宇宙 更新时间:2023-11-04 05:42:36 25 4
gpt4 key购买 nike

这种黄色(Ubuntu 上为橙色)背景色在 ls 中意味着什么?

enter image description here

neoexpert@sonderbyte:/srv/thing$ ls -l
total 32
drwxrwsr-x 2 root developers 4096 Aug 25 12:30 branches
-rw-rw-r-- 1 root developers 66 Aug 25 12:30 config
-rw-rw-r-- 1 root developers 73 Aug 25 12:30 description
-rw-rw-r-- 1 root developers 23 Aug 25 12:30 HEAD
drwxrwsr-x 2 root developers 4096 Aug 25 14:00 hooks
drwxrwsr-x 2 root developers 4096 Aug 25 12:30 info
drwxrwsr-x 4 root developers 4096 Aug 25 12:30 objects
drwxrwsr-x 4 root developers 4096 Aug 25 12:30 refs
neoexpert@sonderbyte:/srv/thing$

最佳答案

只需尝试 ls -l 即可找到答案(这比在这里提问更快)。

阅读ls(1)并使用 echo $LS_COLORS

查看您的 LS_COLORS 环境变量

(看起来您对普通文件有可疑的 sticky bit ;另请参阅 this ;也可尝试 stat(1) 对奇怪的文件......)

不要在文件上使用粘滞位(仅在目录上)。

顺便说一句,我怀疑为 git 设置粘性位是一个错误。

关于Linux ls 显示黄色背景的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45881144/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com