What is `ls -l`?

0103

The command ls -l is used in Unix/Linux systems to list files and directories in the current directory in a long format. Here's what it does:

  • ls: This is the command to list directory contents.
  • -l: This option stands for "long format" and provides detailed information about each file and directory.

Output Details

When you run ls -l, you'll see information such as:

  • File type and permissions (e.g., -rw-r--r--)
  • Number of links
  • Owner name
  • Owner group
  • File size (in bytes)
  • Last modification date and time
  • File or directory name

Example

$ ls -l
total 12
drwxr-xr-x 2 user group 4096 Jan  1 12:00 dir1
-rw-r--r-- 1 user group  123 Jan  1 12:00 file1.txt

This output shows one directory (dir1) and one file (file1.txt) with their respective details.

0 Comments

no data
Be the first to share your comment!