I have a picture of a tree diagram for linux/unix terminal. the partial tree diagram, assume your username is lab4aand your current (and home) directory is /Labs/lab4a

Just to verify the color scheme, all the blue labels must be folders, the greens are executable, but what are the black ones? Right under "security" and "richmondhill" there are a few files, are they text documents?

(ps, im using cygwin64 terminal to emulate linux/unix terminal in windows, so the tree command doesnt work, thats why im posting this question)


1 Answer 1


TL;DR: The black ones are regular files. (Probably.) This is a unix concept that isn't dependent on the file contents: it merely means it's not a "special file" (a pipe, device, socket, directory, etc).

By default tree's colorization follows $LS_COLORS, if set, and provides a builtin default if not. ($TREE_COLORS, if set, overrides $LS_COLORS; I assume they use the same format.) The dircolors command can be used to print a default setting; see man 5 dir_colors for the full format (also this answer for more about the color format).

On my system dircolors provides the following definition (newlines and comments added for clarity).

# starts with various filetypes (as in dir_colors manpage)
# these filetypes have nothing to do with filename, only attributes
# "di" = directory, "so" = socket,
# "ex" = executable (has 'x' permission set)
# etc

 # colors based on filename matching
 # various archive extensions

 # various video extensions     

 # various audio extensions

 # end

So, assuming your output is from tree with default color output, all we can say about these black-colored files is that they are regular files with no execute permission set. The data in those files could be MP3 data -- if the filename doesn't end in .mp3, tree won't color it like an MP3 file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .