15 Basic ‘ls’ Command Examples in Linux

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

29 Responses

  1. Vasu says:

    Superb Article

  2. Thet says:

    How to list files starting like character a or aa.. etc.

    • Ravi Saive says:

      To list all files starting with ‘a’ character, use the following command. For better understanding I’ve posted output also..

      # ls -l a*
      -rw-r--r-- 1 tecmint tecmint 0 May 31 12:37 a
      -rw-r--r-- 1 tecmint tecmint 0 May 31 12:37 aa
      -rw-r--r-- 1 tecmint tecmint 0 May 31 12:37 aaa
  3. pagan says:

    And I would also like to add what I was searching for …

    ls -1 ( numerical 1) – lists each file name in a new line

  4. Bilal Korir says:

    Thank you for sharing, I found what I was looking for :)

  5. Rondinelli says:

    Good review! :)

  6. Shiva says:

    can u explain me about the following command

    ls -alhtr

    • Jose says:

      The command you are using does the following:

      list all files with

      -a = hidden
      -l = list
      -h = human readable
      -t = time
      -r = reverse

      So, the output will be a listing of all files (including hidden files) showing mb and gb (instead of bytes) and the order will be in reverse of time (older first, this is done by the combination of -tr)


  7. Hrvoje says:

    Where is the next article?

  8. heiko says:

    this is for beginners too!?!
    pls describe what I see. who is user, who is group? what is the meaning of the permissions.

  9. Vicente says:

    It’s not the same as its ;-)

  10. David Seghur says:

    You can temporarily unalias an alias by putting the backslash in front of the command like this:

    $ \ls

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.