Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

I just mistyped ls as la. Without noticing, I ran it:

tim@Hairy:~$ la
detection.sh   output-2.jpg  output-4.jpg  output-6.jpg  output-8.jpg Test1.pdf
output-1.jpg   output-3.jpg  output-5.jpg  output-7.jpg  output-9.jpg     
tim@Hairy:~$ ls
detection.sh   output-2.jpg  output-4.jpg  output-6.jpg  output-8.jpg Test1.pdf
output-1.jpg   output-3.jpg  output-5.jpg  output-7.jpg  output-9.jpg 

What's the difference between ls and la?

share|improve this question
1  
Run type la. ;) – kos Feb 17 at 17:33
    
@kos ahh. Nice - so not there for typos? – Tim Feb 17 at 17:34
    
Nope. See also alias | grep '^alias l'. – kos Feb 17 at 17:36
    
That raised the question that ls is aliased to ls... How? – Tim Feb 17 at 17:39
    
up vote 6 down vote accepted

From .bashrc file in your home directory, we have these aliases:

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

la is just an alias of ls with just the -A option.

From man ls

ls -alF

   -a, --all
          do not ignore entries starting with .

   -l     use a long listing format

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


ls -A

   -A, --almost-all
          do not list implied . and ..
share|improve this answer

By default la is an alias for ls -A. In contrast to just ls it doesn't omit files starting with a dot, except for . and ..

share|improve this answer

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.