Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 即使dir--color工作正常,也无法使ls--color工作_Linux_Unix_Colors_Ls - Fatal编程技术网

Linux 即使dir--color工作正常,也无法使ls--color工作

Linux 即使dir--color工作正常,也无法使ls--color工作,linux,unix,colors,ls,Linux,Unix,Colors,Ls,我花了几个小时在这里和其他网站上搜索如何将ls颜色设置为默认值。有很多资源,我尝试了很多。以某种方式获取命令“dir--color”处理彩色显示,而不是“ls--color” 键入dir--color后,目录将以青色显示,而以粗体显示,但不以彩色显示 附件是我的.bashrc #!/bin/bash ### add dircolor evaluation eval `dircolors ~/.dir_colors` ### adding command alias #alias ll='

我花了几个小时在这里和其他网站上搜索如何将ls颜色设置为默认值。有很多资源,我尝试了很多。以某种方式获取命令“dir--color”处理彩色显示,而不是“ls--color”

键入dir--color后,目录将以青色显示,而以粗体显示,但不以彩色显示

附件是我的.bashrc

#!/bin/bash

### add dircolor evaluation

eval `dircolors ~/.dir_colors`

### adding command alias

#alias ll='ls -l '
alias ll='ls -l --color'
alias lla='ls -la --color'
alias dir='dir --color'
alias ls='ls --color -l'
我有我的.dir\u颜色设置

# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
# Copyright (C) 1996-2015 Free Software Foundation, Inc.
# Copying and distribution of this file, with or without modification,
# are permitted provided the copyright notice and this notice are preserved.
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
# slackware version of dircolors) are recognized but ignored.
# Below, there should be one TERM entry for each termtype that is colorizable
TERM Eterm
TERM ansi
TERM color-xterm
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28

TERM mach-color
TERM mach-gnu-color
TERM mlterm
TERM putty
TERM putty-256color
....
TERM vt100
TERM xterm
TERM xterm-16color
TERM xterm-256color
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
#NORMAL 00 # no color code at all
#FILE 00 # regular file: use no color at all
RESET 0 # reset to "normal" color
DIR 01;36 # directory
LINK 01;36 # symbolic link. (If you set this to 'target' instead of a

 # numerical value, the color is as for the file pointed to.)
MULTIHARDLINK 00 # regular file with more than one link
FIFO 40;33 # pipe
SOCK 01;35 # socket
DOOR 01;35 # door
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ...
MISSING 00 # ... and the files they point to
SETUID 37;41 # file that is setuid (u+s)
SETGID 30;43 # file that is setgid (g+s)
CAPABILITY 30;41 # file with capability
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
# This is for files with execute permission:
EXEC 01;32
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
 # archives or compressed (bright red)
.tar 01;31
.tgz 01;31
.arc 01;31
.arj 01;31
.taz 01;31
.lha 01;31
.lz4 01;31
.lzh 01;31
.lzma 01;31
.tlz 01;31
.txz 01;31

请注意,Stackoverflow用于编程问题。你可能想试一下。但是一定要先阅读他们的帮助页面,看看你的问题是否合适。谢谢你提供的信息!不知道有这样的网站。:)