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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I accidentally typed l instead of ls today and found that the command still printed a list of the files in my current directory. Trying l --help brings up the help file for ls suggesting that l is just an alias of ls.

Howver, each file was suffixed by a *. Why is this and what does it mean?

In case it makes a difference, this is when running the latest stable version of Ubuntu.

share|improve this question

marked as duplicate by muru, Anthon, Jakuje, chaos, don_crissti Feb 17 at 19:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

I came here after seeing the tweet, Unix commands turned into companies , twitter.com/valaafshar/status/540694808382431232 and 'l' doesn't work on my mac! lol – AnneTheAgile Jan 10 '15 at 23:55
try la..just found that too – VarunAgw Jun 27 '15 at 6:36
@don_crissti the other one is broader, since it names about one more alias, and asks about more. – muru Feb 17 at 18:14
@muru The other answer does not explain what the * in front of each file is. – BinaryZebra Feb 17 at 18:46
@BinaryZebra Considering the accepted answer here doesn't explain it either, I'm inclined to think it's a minor point. :shrug: – muru Feb 17 at 18:48
up vote 54 down vote accepted

A good way to inspect what a command is:

type l

If it's a program or a script, it will give you its location, if it is an alias, it will tell you what it's aliased to, if it's a function, it will print the funciton; otherwise, it will tell you if it is a built-in or a keyword.


$ type l
l is aliased to `ls -CF'
$ type find
find is /usr/bin/find
$ type connecthome
connecthome is hashed (/usr/local/bin/connecthome)
$ type grep
grep is aliased to `grep --color=auto --binary-files=without-match --devices=skip'
$ type hello_se
hello_se is a function
hello_se () 
  echo 'Hello, Stack Exchangers!'
$ type type
type is a shell builtin
$ type for
for is a shell keyword
$ type nosuchthing
-bash: type: nosuchthing: not found
share|improve this answer
Now that's a cool trick. I'll have to remember that one. – Jonathan M Davis Nov 26 '10 at 6:15
This command (A bash builtin) is very useful. I'm amazed that I've never seen it mentioned everywhere. – Stefan Lasiewski Nov 28 '10 at 4:37
Excellent examples, I think you covered it thoroughly. Since I've seen people use type to check if a command is installed, I'll just mention here that it's possible for the hashed commands to be out of date, in which case type <binary-name> will return success for some time after <binary-name> has actually been deleted. – Wildcard Jan 6 at 5:40
$ l --help
l: command not found

Looks like you have an alias set up in your environment. Perhaps you have inherited a .profile, .bashrc or similar containing something like alias l='ls -F'.

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

Try which l and alias to track down its definition.

share|improve this answer
specifically the * after a file name means that the file is executable – phunehehe Nov 26 '10 at 2:27

FIXED: l is an alias for ls -CF ( I am not really sure ) in the default .bashrc in ubuntu

You can just type alias to check out all the aliases. It would be mentioned there.

share|improve this answer
ls -d that seems like the most useless alias ever. all that prints is . – xenoterracide Nov 28 '10 at 0:48
-1: in Ubuntu 10.10 it's disabled (commented) by default, and it aliases to ls -CF. – badp Nov 28 '10 at 15:10
but it was there in previous versions. and yes, it was ls -CF, i just didn't have access to an older ubuntu machine to test it out. – Rohan Monga Nov 29 '10 at 5:31

By default, it is an alias for ls -CF in ubuntu.

share|improve this answer

I redefined all my ls shortcuts in my .zshrc.

This is the relevant section:

# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
    if [ -n ~/.dir_colors ]; then
        eval "`dircolors -b ~/.dir_colors`"
        eval "`dircolors -b /etc/DIR_COLORS`"
    alias ls='ls --color=auto'
    #alias dir='ls --color=auto --format=vertical'
    #alias vdir='ls --color=auto --format=long'

# some more ls aliases
alias l='ls -CF'
alias ll='ls -ClhF'
alias la='ls -CaF'
alias lla='ls -CalhF'
alias l.='ls -CAF --ignore=\*'
alias ll.='ls -CAlhF --ignore=\*'
alias t='tree -C'

Note that ls is redefined itself:

% type ls
ls is an alias for ls --color=auto
share|improve this answer

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