Planning Groups for a System

Each file on a UNIX system belongs to exactly one user and one group. This ownership dictates who may read and edit the file and, in case the file is an executable file, who might execute it. Directories have similar permissions, which you’ll see later.

Ownership information can be seen by using the command ls, if you give it the appropriate set of options:

ls -ldg security.html
-rw-r--r--   1 blackie  users       12383 Mar 15 10:27 security.html

Finding the Names for a File

The second column of long listing is the number of names for the given file. This is the number of hard links for the given file if it is a plain file. For directories, this is 2 plus the number of subdirectories: Each subdirectory has a link to the ...

Get Practical UNIX now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.