Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I noticed that when I list my executables with ls on my Z shell they show up with a character * next to their name (e.g. see the file in red .test_color_scheme)

    enter image description here

What is causing this? I understand the colors are controlled by by LS_COLORS? But is LS_COLORS also responsible for showing * next to their name? or is there anything else that causes this?

Note: I verified this happens to all my executable files, and that the character * is not part of the file name (e.g. to open the file I type cat filename without the * character)

share|improve this question
add comment

2 Answers 2

up vote 6 down vote accepted

This is caused by the -F/--classify flag on ls (as are the / after directories, though those can be added independently). It seems this option is aliased into your ls. If you would like to disable it, you should track down where it is added as an alias and remove it, or add --indicator-style=none.

The following options affect these indicators:

-F, --classify
    append indicator (one of */=>@|) to entries

--file-type
    likewise, except do not append `*'

-p, --indicator-style=slash
    append / indicator to directories

--indicator-style=WORD
    append indicator with style WORD to entry names: none (default),
    slash (-p), file-type (--file-type), classify (-F)
share|improve this answer
add comment

You have probably an alias for ls containing the -F option. Something akin to:

alias ls="ls -F"
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.