File and directory attributes
The system handles files and directories in the same way; directories are
just specialized files, containing other files and directories rather
than program code or text. Files and directories both have a name, a
path, and a set of attributes. Internally, the system keeps track of
files and directories using inodes, or index nodes. See
``How the system manages files and directories''.
A simple way of checking some of the attributes of a file or
directory is the long listing, obtained using the
-l option to the
ls(C)
command (or just l):
What you see in a long listing
-
The first field (file type) indicates the sort of file that is
present in the listing. The following codes are some of those used
(for a full list, see
ls(C)):
--
ordinary file
b-
block special file
c-
character special file
d-
directory
l-
symbolic link
p-
named pipe
-
The second field (permissions) shows who is permitted to read,
write, or execute a file, or change to a directory. Users are
split into the file's owner, people in the same work group as the
owner, and other people. A separate set of permissions is
maintained for each category. The notation used here is
explained in detail in
``Access control for files and directories''.
-
The third field (links) shows the number of links that exist for the
file (links are discussed in
``Creating links to files and directories''
).
-
The fourth field (owner) shows the login name of the owner of the
file.
-
The fifth field (group) shows the group to which the file belongs;
that is, the group of users who have ``group'' access permission to
the file. See
``Finding out your group''
for an explanation of groups.
-
The sixth field (size) shows the number of bytes in the file.
-
The seventh and eighth fields (date and time of last modification)
show the date and time when the file was last modified.
-
The final field (filename) shows the name of the file. See
``Filenaming conventions''
for more on filenames.
Next topic:
How the system manages files and directories
Previous topic:
Using directories
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005