From the course: Linux CentOS 7: Files and Permissions

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Get file attributes

Get file attributes - Linux Tutorial

From the course: Linux CentOS 7: Files and Permissions

Start my 1-month free trial

Get file attributes

- [Instructor] Data that describes other data is called, metadata. It's important to be able to view metadata describing attributes of our files. These attributes may include the file name, its size, permissions and ownership, and access time. The quickest way to get information about a file is by doing a long list. In a Terminal, type in ls -l /etc/passwd, and hit enter. This will give us a long list of the etc password file. Let's take a look. In the first column is the file type. In our example, the etc password file has a hyphen. So it's a regular file. The next three characters is the user owner's permissions. The possible options are r for read, w for write, and x for execute. The user owner is the third column from the left. In our case, the user owner is root. The next three characters are the group owner's permissions. Every file is owned by one user owner, and one group owner. The group owner is the fourth column from the left. The group owner of this file is the root group,…

Contents