mac下Terminal中不同文件类型不同颜色显示
来源:互联网 发布:在哪可以买到淘宝账号 编辑:程序博客网 时间:2024/05/09 19:03
Terminal 下不同类型的文件显示不同的颜色
Terminal 默认的 shell 是 bash (提示符是 $)
在 ~ 先建立一个文件 ~/.bash_profile
加入下面的两行:
export CLICOLOR=1
export LSCOLORS=gxfxaxdxcxegedabagacad
存盘, 退出Terminal, 重起Terminal.
更改LSCOLORS可以有不同的颜色效果。
-----------------------------------------------------
如果你用的是 csh/tcsh (提示符是 %), 建立 ~/.cshrc 加入
setenv CLICOLOR 1
setenv LSCOLORS gxfxaxdxcxegedabagacad
存盘, 执行 source ~/.cshrc
------------------------------------------------------
LSCOLORS 的含义:
LSCOLORS The value of this variable describes what color to use
for which attribute when colors are enabled with
CLICOLOR. This string is a concatenation of pairs of the
format fb, where f is the foreground color and b is the
background color.
The color designators are as follows:
a black
b red
c green
d brown
e blue
f magenta
g cyan
h light grey
A bold black, usually shows up as dark grey
B bold red
C bold green
D bold brown, usually shows up as yellow
E bold blue
F bold magenta
G bold cyan
H bold light grey; looks like bright white
x default foreground or background
Note that the above are standard ANSI colors. The actual
display may differ depending on the color capabilities of
the terminal in use.
The order of the attributes are as follows:
1. directory
2. symbolic link
3. socket
4. pipe
5. executable
6. block special
7. character special
8. executable with setuid bit set
9. executable with setgid bit set
10. directory writable to others, with sticky bit
11. directory writable to others, without sticky
bit
The default is “exfxcxdxbxegedabagacad”, i.e. blue fore-
ground and default background for regular directories,
black foreground and red background for setuid executa-
bles, etc.
Terminal 默认的 shell 是 bash (提示符是 $)
在 ~ 先建立一个文件 ~/.bash_profile
加入下面的两行:
export CLICOLOR=1
export LSCOLORS=gxfxaxdxcxegedabagacad
存盘, 退出Terminal, 重起Terminal.
更改LSCOLORS可以有不同的颜色效果。
-----------------------------------------------------
如果你用的是 csh/tcsh (提示符是 %), 建立 ~/.cshrc 加入
setenv CLICOLOR 1
setenv LSCOLORS gxfxaxdxcxegedabagacad
存盘, 执行 source ~/.cshrc
------------------------------------------------------
LSCOLORS 的含义:
LSCOLORS The value of this variable describes what color to use
for which attribute when colors are enabled with
CLICOLOR. This string is a concatenation of pairs of the
format fb, where f is the foreground color and b is the
background color.
The color designators are as follows:
a black
b red
c green
d brown
e blue
f magenta
g cyan
h light grey
A bold black, usually shows up as dark grey
B bold red
C bold green
D bold brown, usually shows up as yellow
E bold blue
F bold magenta
G bold cyan
H bold light grey; looks like bright white
x default foreground or background
Note that the above are standard ANSI colors. The actual
display may differ depending on the color capabilities of
the terminal in use.
The order of the attributes are as follows:
1. directory
2. symbolic link
3. socket
4. pipe
5. executable
6. block special
7. character special
8. executable with setuid bit set
9. executable with setgid bit set
10. directory writable to others, with sticky bit
11. directory writable to others, without sticky
bit
The default is “exfxcxdxbxegedabagacad”, i.e. blue fore-
ground and default background for regular directories,
black foreground and red background for setuid executa-
bles, etc.
0 0
- mac下Terminal中不同文件类型不同颜色显示
- Mac Terminal下文件类型不同颜色不同的设置
- Mac终端文件类型显示不同颜色
- Mac 下 Terminal显示颜色设置
- 彻底解决mac下terminal路径显示问题
- Mac下Terminal路径显示配置
- 【学习】css之链接在不同状态下显示不同颜色
- Mac终端ls显示不同文件类型的颜色
- Mac终端ls显示不同文件类型的颜色
- label 中可以显示不同字体,不同颜色 的text
- textview显示不同颜色不同大小
- 修改mac中terminal窗口显示的计算机名称
- 配置mac的terminal显示
- 同一label显示不同颜色,不同大小字体
- [ios]字符串不同位置显示不同颜色
- label 显示不同颜色 不同文字点击事件
- repeater根据不同字段显示不同颜色
- 一个UILabel不同部分显示不同颜色
- Linux命令 uname
- mysql LIKE,FIND_IN_SET,locate,查询字段中包含
- Java Spring 事务管理
- 共享内存的查看与释放
- 依赖倒转原则(Dependency Inversion Principle,DIP)
- mac下Terminal中不同文件类型不同颜色显示
- 专题目录
- 子盒子水平垂直居中的小技巧
- 《Effect C++》学习------条款11:在 operator= 中处理“自我赋值”
- java socket服务器客户端多线程小例子
- jni中数据类型的转换问题
- 我的第一个struts2(基于myeclipce2016)
- 图像形态学处理(5.几个应用)
- Spring事务传播及隔离