赞助商广告

linux操作系统 dircolors命令手册

dircolors

置ls命令在显示目录或文件时所用的色彩

补充说明

dircolors命令 设置ls命令在显示目录或文件时所用的色彩。dircolors可根据[色彩配置文件]来设置LS_COLORS环境变量或是显示设置LS_COLORS环境变量的命令。

语法

dircolors(选项)(参数)

选项

-b或--sh或--bourne-shell:显示在Boume shell中,将LS_COLORS设为目前预设置的shell指令;
-c或--csh或--c-shell:显示在C shell中,将LS_COLORS设为目前预设置的shell指令;
-p或--print-database:显示预设置;
-help:显示帮助;
-version:显示版本信息。

参数

文件:指定用来设置颜色的文件。

实例

[root@localhost ~]# dircolors -p
# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
# 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 linux
TERM linux-c
TERM mach-color
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cygwin
TERM dtterm
TERM putty
TERM xterm
TERM xterm-color
TERM xterm-debian
TERM rxvt
TERM screen
TERM screen-bce
TERM screen-w
TERM vt100
TERM Eterm
# 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 # global default, although everything should be something.
FILE 00 # normal file
DIR 01;34 # 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.)
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
SETUID 37;41 # file that is setuid (u+s)
SETGID 30;43 # file that is setgid (g+s)
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.
# (and any comments you want to add after a '#')
# If you use DOS-style suffixes, you may want to uncomment the following:
#.cmd 01;32 # executables (bright green)
#.exe 01;32
#.com 01;32
#.btm 01;32
#.bat 01;32
.tar 01;31 # archives or compressed (bright red)
.tgz 01;31
.arj 01;31
.taz 01;31
.lzh 01;31
.zip 01;31
.z 01;31
.Z 01;31
.gz 01;31
.bz2 01;31
.deb 01;31
.rpm 01;31
.jar 01;31
# image formats
.jpg 01;35
.jpeg 01;35
.gif 01;35
.bmp 01;35
.pbm 01;35
.pgm 01;35
.ppm 01;35
.tga 01;35
.xbm 01;35
.xpm 01;35
.tif 01;35
.tiff 01;35
.png 01;35
.mov 01;35
.mpg 01;35
.mpeg 01;35
.avi 01;35
.fli 01;35
.gl 01;35
.dl 01;35
.xcf 01;35
.xwd 01;35
# audio formats
.flac 01;35
.mp3 01;35
.mpc 01;35
.ogg 01;35
.wav 01;35

linux命令手册

btrfs subvolume 管理 btrfs 子卷和快照。
aurvote 为 AUR 中的包投票。
apt-add-repository 管理 apt 仓库。
cpuid 显示有关所有 CPU 的详细信息。
blkdiscard 丢弃存储设备上的设备扇区。对 SSD 有用。
adduser 添加用户的工具。
i3 一款动态平铺窗口管理器。
chage 更改用户账户和密码到期信息。
unix2mac 将 Unix 样式的行尾更改为 macOS 样式。
btrfs 一种基于写时复制(COW)原理的 Linux 文件系统。
anbox 在任何 GNU/Linux 操作系统上运行安卓应用。
asterisk 电话和交换(手机)服务器。
ul 执行文本的下划线。
grub-install 安装 GRUB 到设备。
sacctmgr 查看、配置、管理 Slurm 账户。
cp 复制文件和目录。
ubuntu-bug 这是 `apport-bug` 命令的一个别名。
acpi 显示电池状态或热量信息。
apt-cache Debian 和 Ubuntu 的包查询工具。
konsole Konsole: KDE 终端模拟器。
ascii 显示 ASCII 字符的别名。
cal 打印日历信息,高亮显示当前日期。
avahi-browse 显示通过 mDNS/DNS-SD 暴露在本地网络的服务和主机。
readelf 显示 EFI 文件信息。
archlinux-java 提供 Java 环境设置功能的一个帮助脚本。
mac2unix 将 macOS 样式的行尾更改为 Unix 样式。
a2disconf 在基于 Debian 的操作系统上禁用 Apache 配置文件。
archinstall Arch Linux 引导安装程序。
amixer ALSA 声卡驱动程序的混合器。
addr2line 将二进制文件地址转换成文件名和行数。
bluetoothd 管理蓝牙设备的守护进程。
arithmetic 测试见到你的算术问题。
a2ensite 在基于 Debian 的操作系统上启用 Apache 虚拟主机。
btrfs filesystem 管理 btrfs 文件系统。
openvpn3 OpenVPN 3 Linux 客户端。
ark KDE 归档工具。
apport-bug 在 Ubuntu 上提交错误报告。
poweroff 关闭系统。
betterlockscreen 简洁的锁屏程序。
grub-mkconfig 生成GRUB配置文件。
apt-mark 修改已安装软件包状态的工具。
bluetoothctl 从命令行管理蓝牙设备。
lvs 显示逻辑卷信息。
bpftrace Linux eBPF 的高级跟踪语言。
dmesg 显示或控制内核环形缓冲区。
aura Aura 包管理器:一个安全且支持多语言的 Arch Linux 和 AUR 的包管理器。
unix2dos 将 Unix 样式的行尾更改为 DOS 样式。
bitwise 支持动态基数转换和位操作的多基数交互式计算器。
apache2ctl Apache HTTP web 服务器命令行管理工具。
archey 一个可以以新颖的方式显示系统信息的简单工具。
batcat 这是 `bat` 命令的一个别名。
a2dismod 在基于 Debian 的操作系统上禁用 Apache 模块。
line 读取单行输入。
a2query 在基于 Debian 的操作系统上查看 Apache 运行配置。
aptitude Debian 和 Ubuntu 上的软件包管理工具。
btrfs device 管理 btrfs 文件系统中的设备。
at 在指定时间执行命令。
arecored ALSA 声卡驱动的声音录制器。
megadl 这是 `megatools-dl` 命令的一个别名。
pacman Arch Linux 的软件包管理器工具。
as 一个可移植的 GUN 汇编器。
boltctl 控制雷电(thunderbolt)设备。
apt-file 在 apt 软件包中查找文件,其中也包括未安装的软件。
w 显示登录者及其进程。
yay Yet Another Yogurt: 一个用于 Arch Linux 的工具,用于从 Arch User Repository 中构建和安装软件包。
apt-get Debian 和 Ubuntu 的软件包管理工具。
flatpak 构建、安装和运行 Flatpak 应用和运行时。
arch-chroot 辅助 Arch Linux 安装流程的更强 `chroot` 命令。
reboot 重新启动系统。
alpine 一个电子邮件客户端和 usenet 新闻组程序,具有 pico/nano 风格的界面。
aurman 用来构建和安装 AUR 包的 Arch Linux 实用工具。
autorandr 自动调节屏幕布局。
ac 打印用户连接时长数据。
ip-route-list 这是 `ip-route-show` 命令的一个别名。
iptables 可用于配置 Linux 内核防火墙提供的过滤表、规则链和规则的程序。
aplay ALSA 声卡驱动程序的命令行声音播放器。
dos2unix 将 DOS 样式的行尾更改为 Unix 样式。
xcowsay 在您的 Linux 桌面上显示一头可爱的牛和指定的消息。
asciiart 将图像转换为 ASCII.
apt-key Debian 和 Ubuntu 上的 APT 软件包管理器的密钥管理工具。
abbr 管理 fish shell 的缩写。
lsattr 列出 Linux 系统下的文件属性。
add-apt-repository apt 仓库管理。
a2enmod 在基于 Debian 的操作系统上启用 Apache 模块。
balooctl KDE Plasma 的文件索引和搜索框架。
diff3 逐行比较三个文件。
debuild 从源代码构建 `Debian` 软件包的工具。
dmenu 动态菜单。
ncal 这是 `cal` 命令的一个别名。
cc 这是 `gcc` 命令的一个别名。
yaourt Arch Linux 中用于从 Arch User Repository 中构建软件包的工具。
apt 基于 Debian 的发行版上的软件包管理工具。
zypper SUSE & openSUSE 的软件包管理工具。
auracle 用来和 Arch Linux 用户仓库交互的命令行工具,这个仓库通常被称作 AUR.
brctl 以太网桥管理。
a2dissite 在基于 Debian 的操作系统上禁用 Apache 虚拟主机。
aspell 交互式拼写检查工具。
authconfig 用于设置系统认证资源的命令行界面。
btrfs scrub 清理 btrfs 文件系统以验证数据完整性。
bmon 监控带宽并捕获网络相关统计信息。
beep 让电脑扬声器发出哔哔声的实用程序。
brightnessctl GUN/Linux 操作系统上用来读取和控制设备亮度的实用工具。
addpart 将特定分区的存在告知 Linux 内核。
debootstrap 创建一个基本的 `Debian` 系统。
alternatives 这是 `update-alternatives` 命令的一个别名。
bpytop 用图形显示有关正在运行的进程的动态实时信息。类似于 `gtop` 和 `htop`.
flameshot 带有 GUI 界面的 Screenshot 工具。
bspwm 这是 `bspc` 命令的一个别名。
cgroups 这是 `cgclassify` 命令的一个别名。
logsave 将一个命令的输出保存在日志文件中。
a2enconf 在基于 Debian 的操作系统上启用 Apache 配置文件。
apk Alpine Linux 的包管理工具。
blkid 列出所有已识别的分区及其通用唯一标识符 (UUID)。