2.10.2. File Attributes

Linux for Programmers and Users, chapter 3.26

Type:

Whether ordinary, directory, device, etc.

Permissions:

Determines who can read, write or execute a file.

Links:

Number of hard links to the file. A number of files in the file system can actully reference the same file on the drive.

Owner:

A file is owned by a user, by default its creator. The owner can change many file attributes and set the permissions.

Group Owner:

The group which owns the file. The owner by default belongs to this group.

File Size:

Number of bytes of data contained.

File Time Stamps:
  • Date and time of last modification
  • Date and time of last access

Note

The size of a directory is generally small because it is directly related to the number of filenames it contains.

Also, look at some of the files in /dev and note the pair of numbers in the size column. A device file contains no data, but the device can still be operated by using these two parameters stored in the inode.

There’s only one file attribute that is not stored in the inode: the filename. This name is stored in the directory. This scheme allows a file to have multiple filenames having the same inode number. But why does a file need multiple names?