上午裝了centos6 minimal仰美,ls列出來的目錄顏色簡直瞎眼迷殿。
雖然ssh方便,但是強(qiáng)迫癥不能忍咖杂。
百度修改方法庆寺,找了個把小時,居然沒一個能用的诉字。
必應(yīng)了一下懦尝,一下就有結(jié)果了,吐血(網(wǎng)頁可能需要灰機(jī))
https://www.howtogeek.com/307899/how-to-change-the-colors-of-directories-and-files-in-the-ls-command/
下面復(fù)制粘貼吧
直接命令看結(jié)果
LS_COLORS="di=1:31"
1是粗體壤圃,31是顏色
【引用】顏色定義
Black: 30
Blue: 34
Cyan: 36
Green: 32
Purple: 35
Red: 31
White: 37
Yellow: 33
【引用】標(biāo)識定義
Directory: di
File: fi
Symbolic Link: ln
Named Pipe (FIFO): pi
Socket: so
Block Device: bd
Character Device: cd
Orphan Symbolic Link (points to a file that no longer exists): or
Missing File (a missing file that an orphan symbolic link points to): mi
Executable File (has the “x” permission): ex
*.extension: Any file ending with an extension you specify. For example, use *.txt for files ending in .txt, *.mp3 for files ending in .mp3, *.desktop for files ending in .desktop, or anything else you like. You can specify as many different file extensions as you like.
啟動生效
加到~/.bashrc最后
export LS_COLORS=$LS_COLORS"di=1;31:"