Show file permissions?

QuestionsQuestions8 SkillsProBasic Files OperationsNov, 01 2025
089

To show file permissions in a directory, you can use the ls command with the -l option. This provides a detailed listing of files, including their permissions.

Command:

ls -l

Example Output:

-rw-r--r-- 1 user group  1234 Jan 12 16:20 example.txt

Breakdown of the Output:

  • -rw-r--r--: File permissions
    • The first character indicates the type (- for a regular file, d for a directory).
    • The next three characters (rw-) show the owner's permissions (read and write).
    • The next three (r--) show the group's permissions (read only).
    • The last three (r--) show others' permissions (read only).
  • 1: Number of hard links.
  • user: Owner of the file.
  • group: Group associated with the file.
  • 1234: Size of the file in bytes.
  • Jan 12 16:20: Last modification date and time.
  • example.txt: Name of the file.

This command gives you a clear view of the permissions for each file in the directory. Let me know if you need more information!

0 Comments

no data
Be the first to share your comment!