Linux Command Line Tutorial: LS Command

Video is ready, Click Here to View ×

. List the contents of a directory with the ls commands, the ls commands has many options so we’ll just go over the most fundamental ones. Options are typed after the “-” symbol and they can be typed in any order, to color code the results for this commands type two dashes followed by the word “color”.


  1. Probably this is common knowledge but I had to google to find it. If you have a lot of files in your directory you can pipe <ls> through the <less> command, so you can arrow-key up and down through it:

    ls <whatever> | less

    and then type 'q' to exit back to your command line prompt.

    I use the bash shell on my iMac, and find myself having quite a lot of fun exploring my system with <ls>, and learning the Unix CLI overall.

  2. The date and time are called a time stamp. It changes everytime you modify or access the file and you can update it with the touch command. You can use the -a switch to modify the access time only or the -m switch to modify the modification time only. Must be root to touch a file.

  3. If you haven't already watch the video on "man".

    "man" is another command which stands for manual, this command shows you all the options for any command. To use man all you have to do is type the word man followed by the command you would like to see the options of and hit enter. If you got any questions let me know alright.

Leave a Reply

Your email address will not be published.