Linux command: ls

A quick guide to the ls command to list files in a folder

In the folder, you can use to list all the files contained in the folder.lscommand:


If you add a folder name or path, it will print the contents of the folder:

ls /bin

lsAccept many choices. One of my favorite combination of options is-al. Try it:

ls -al /bin

Compared to plainls, Which will return more information.

You have a left-to-right position:

  • File permissions (if your system supports ACL, you will also get ACL flags)
  • The number of links to the file
  • The owner of the file
  • File group
  • File size (in bytes)
  • The date and time the file was modified
  • file name

This set of data is made up oflOptions. ThisaConversely, this option also displays hidden files.

Hidden files refer to dots (.).

This command can be used in Linux, macOS, WSL and wherever you have a UNIX environment

Download mine for freeLinux Command Manual

More cli tutorials: