what does terminal command: ls -l show?

后端 未结 3 1818
执笔经年
执笔经年 2020-12-24 05:50

I know that it outputs the \"long\" version but what do each of the sections mean?

On my mac, when I type in

ls -l /Users 

I ge

3条回答
  •  不思量自难忘°
    2020-12-24 06:20

    The option '-l' tells the command to use a long list format. It gives back several columns wich correspond to:

    • Permissions
    • Number of hardlinks
    • File owner
    • File group
    • File size
    • Modification time
    • Filename

    The first letter in the permissions column show the file's type. A 'd' means a directory and a '-' means a normal file (there are other characters, but those are the basic ones). The next nine characters are divided into 3 groups, each one a permission. Each letter in a group correspond to the read, write and execute permission, and each group correspond to the owner of the file, the group of the file and then for everyone else.

    • [ File type ][ Owner permissions ][ Group permissions ][ Everyone permissions ]

    The characters can be one of four options:

    • r = read permission
    • w = write permission
    • x = execute permission
    • - = no permission

    Finally, the "+" at the end means some extended permissions.

提交回复
热议问题