免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3226 | 回复: 5
打印 上一主题 下一主题

LINUX系统中的字母的颜色代表什么? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-10-11 00:05 |只看该作者 |倒序浏览
我只知道蓝色是目录,黑色是文件,那浅蓝和绿色代表什么?谢谢了........各位大狭........

论坛徽章:
0
2 [报告]
发表于 2006-10-11 00:59 |只看该作者
可能是ln
你ls -l
看一下

论坛徽章:
0
3 [报告]
发表于 2006-10-11 03:02 |只看该作者
  1. $cat /etc/DIR_COLORS
复制代码

论坛徽章:
0
4 [报告]
发表于 2006-10-11 09:30 |只看该作者

  1. [root@server1 ~]# cat /etc/DIR_COLORS
  2. # Configuration file for the color ls utility
  3. # This file goes in the /etc directory, and must be world readable.
  4. # You can copy this file to .dir_colors in your $HOME directory to override
  5. # the system defaults.

  6. # COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
  7. # pipes. 'all' adds color characters to all output. 'none' shuts colorization
  8. # off.
  9. COLOR tty

  10. # Extra command line options for ls go here.
  11. # Basically these ones are:
  12. #  -F = show '/' for dirs, '*' for executables, etc.
  13. #  -T 0 = don't trust tab spacing when formatting ls output.
  14. OPTIONS -F -T 0

  15. # Below, there should be one TERM entry for each termtype that is colorizable
  16. TERM linux
  17. TERM console
  18. TERM con132x25
  19. TERM con132x30
  20. TERM con132x43
  21. TERM con132x60
  22. TERM con80x25
  23. TERM con80x28
  24. TERM con80x30
  25. TERM con80x43
  26. TERM con80x50
  27. TERM con80x60
  28. TERM cons25
  29. TERM xterm
  30. TERM rxvt
  31. TERM xterm-color
  32. TERM color-xterm
  33. TERM vt100
  34. TERM dtterm
  35. TERM color_xterm
  36. TERM ansi
  37. TERM screen
  38. TERM screen.linux
  39. TERM kon
  40. TERM kterm
  41. TERM gnome
  42. TERM konsole

  43. # EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
  44. EIGHTBIT 1

  45. # Below are the color init strings for the basic file types. A color init
  46. # string consists of one or more of the following numeric codes:
  47. # Attribute codes:
  48. # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
  49. # Text color codes:
  50. # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
  51. # Background color codes:
  52. # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
  53. NORMAL 00       # global default, although everything should be something.
  54. FILE 00         # normal file
  55. DIR 01;34       # directory
  56. LINK 01;36      # symbolic link
  57. FIFO 40;33      # pipe
  58. SOCK 01;35      # socket
  59. BLK 40;33;01    # block device driver
  60. CHR 40;33;01    # character device driver
  61. ORPHAN 01;05;37;41  # orphaned syminks
  62. MISSING 01;05;37;41 # ... and the files they point to

  63. # This is for files with execute permission:
  64. EXEC 01;32

  65. # List any file extensions like '.gz' or '.tar' that you would like ls
  66. # to colorize below. Put the extension, a space, and the color init string.
  67. # (and any comments you want to add after a '#')
  68. .cmd 01;32 # executables (bright green)
  69. .exe 01;32
  70. .com 01;32
  71. .btm 01;32
  72. .bat 01;32
  73. .sh  01;32
  74. .csh 01;32
  75. .tar 01;31 # archives or compressed (bright red)
  76. .tgz 01;31
  77. .arj 01;31
  78. .taz 01;31
  79. .lzh 01;31
  80. .zip 01;31
  81. .z   01;31
  82. .Z   01;31
  83. .gz  01;31
  84. .bz2 01;31
  85. .bz  01;31
  86. .tz  01;31
  87. .rpm 01;31
  88. .cpio 01;31
  89. .jpg 01;35 # image formats
  90. .gif 01;35
  91. .bmp 01;35
  92. .xbm 01;35
  93. .xpm 01;35
  94. .png 01;35
  95. .tif 01;35

复制代码

论坛徽章:
0
5 [报告]
发表于 2006-10-11 10:15 |只看该作者
如果还是不明白的话可以这样.
echo -e "\\033[后面的值m"比如后面的值是01;35就是echo -e "\\033[01;35m"

[ 本帖最后由 Yuri.G. 于 2006-10-11 10:17 编辑 ]

论坛徽章:
0
6 [报告]
发表于 2006-10-11 17:09 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP