gpt4 book ai didi

linux - MAC .bash_profile : change directory string colors and file names by type

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

我不确定这是否可能,我在谷歌中搜索,但看起来我没有使用正确的搜索字符串。我们如何更改目录字符串、文件等的显示颜色

示例:当我们执行 ls 命令时,我们可以更改 .bash_profile 脚本以将目录显示为红色,文件显示为黄色吗?此外,我们可以根据文件类型更改文件颜色吗?

最佳答案

是的,你可以。使用

export CLICOLOR=true

打开ls中的颜色以及类似

export LSCOLORS=gxfxcxdxbxegedabagacad

自定义每种文件类型的颜色。

类型

man ls

了解 LSCOLORS 工作原理。

关于linux - MAC .bash_profile : change directory string colors and file names by type,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11963576/

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