What is the la command?

10,526

Solution 1

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 ..

Solution 2

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:
10,526

Related videos on Youtube

Tim
Author by

Tim

My name is Tim. I've graduated from the University of Nottingham with a First Class Computer Science BSc with Hons. In my spare time I do computer programming, often C or JavaScript, but also shell scripts, and answering questions on Stack Exchange. I used to spend most of my time on Ask Ubuntu; now I mostly browse the HNQ or Meta Stack Exchange. If you want to contact me it's [email protected] Do you need a reliable VPS? Try Digital Ocean. Sign up with this link for $10 free. One of my favourite sites is Kiva.org, a micro-funding organisation that allows people to lend money via the Internet to low-income entrepreneurs and students in over 80 countries. Kiva's mission is “to connect people through lending to alleviate poverty.” With just $25 you can make a difference - and 99% of loans are paid back in full - so you can lend again and again!

Updated on September 18, 2022

Comments

  • Tim
    Tim almost 2 years

    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?