Linux Programming
Linux Programming
The Unix and Posix file systems are stored in a tree file Hierarchical system. The root
of a file system is the root directory, denoted by “/” characters.
Each intermediate node in a File system tree is a directory file. The last nodes of a File
system tree are either empty directory files or other type of files.
The absolute path name of a file consist of the names of all directories, specified in the
decending order of the directory hirechary, starting from ”/”.
Eg:/usr/xyz/a.out.
A relative path name may consist of the “.” And “..” chars.
These are the references to the current and parent directories, respectively.
A file name and path name may not exeed name-max & path-max
The application programs that are posted to psix-1 and unix systems should manipulate
files with names in following char ser only.
A file may be refernced by motethan one pathname if a user creates one or more
handlinks to the file using the unix in command.
Eg:/usr/prog/new/n1 for the file /usr/foo/path1 after ln command, the file can be
referenced by either path name.
Ln /usr/foo/path1 /usr/prog/new/r1
File USE
/etc Stores System administrative files and programs
Both unix and posix ./ maintain a set of common attributes for each file in a file
sustem. The attributes and the data they specify are:
Acess permission The file access permission for owner, group and others
Inode number
File system id
The attributes are assigned by the kernal to a file system when it is created. Some
of the attributes will stay unchanged for the entire file of the file, where as others may
change as the file is being used, the attributes that are constant for any file are:
·0 File type
·2 File system id