I'm editing the LS_COLORS environment variable. dircolors
lists the default colors for different file types. The file types are denoted as follows:
bd = (BLOCK, BLK) Block device (buffered) special file
cd = (CHAR, CHR) Character device (unbuffered) special file
di = (DIR) Directory
do = (DOOR) [Door][1]
ex = (EXEC) Executable file (ie. has 'x' set in permissions)
fi = (FILE) Normal file
ln = (SYMLINK, LINK, LNK) Symbolic link. If you set this to ‘target’ instead of a numerical value, the color is as for the file pointed to.
mi = (MISSING) Non-existent file pointed to by a symbolic link (visible when you type ls -l)
no = (NORMAL, NORM) Normal (non-filename) text. Global default, although everything should be something
or = (ORPHAN) Symbolic link pointing to an orphaned non-existent file
ow = (OTHER_WRITABLE) Directory that is other-writable (o+w) and not sticky
pi = (FIFO, PIPE) Named pipe (fifo file)
sg = (SETGID) File that is setgid (g+s)
so = (SOCK) Socket file
st = (STICKY) Directory with the sticky bit set (+t) and not other-writable
su = (SETUID) File that is setuid (u+s)
tw = (STICKY_OTHER_WRITABLE) Directory that is sticky and other-writable (+t,o+w)
How do I determine which of these categories a file or directory belongs to?
Links I'm referencing for LS_COLORS:
Using file
is not working; querying a directory tells me the directory is... a directory. But clearly it has a filetype flag that file
is not displaying, because some directories have an absolutely awful pale-green highlight with white text. Using ls -lah
does not work either; the first letter of the permissions string is d
and this again is not enough information.
Ubuntu 19.10 | KDE Plasma 5.16.5 | zsh 5.7.1