What does `ls -l` show?

QuestionsQuestions8 SkillsProDec, 21 2025
0105

Great question! While ls gives you a simple list of names, adding the -l flag changes the output to a "long listing format."

When you run ls -l, it provides much more detail for each file and directory, displayed in columns. Here is what those columns typically represent:

  1. File Permissions: (e.g., drwxr-xr-x) Shows who can read, write, or execute the file.
  2. Number of Links: Indicates how many links point to this file.
  3. Owner: The username of the person who owns the file (usually labex in this environment).
  4. Group: The group the file belongs to.
  5. File Size: The size of the file in bytes.
  6. Modification Time: The last date and time the file was changed.
  7. Name: The actual name of the file or directory.

Example Output:

-rw-r--r-- 1 labex labex 1024 Oct 24 10:00 myfile.txt

Pro Tip: If you want the file sizes to be easier to read (like KB or MB instead of bytes), you can combine it with the -h flag:

ls -lh

The h stands for "human-readable". Give it a try in your terminal!

0 Comments

no data
Be the first to share your comment!