The http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/check-access.c program shown in Fig. 8.1 uses access to check for a file's existence and to determine read and write permissions.
Figure 8.1:
Check File Access Permissions.
|
$ ./check-access /mnt/cdrom/README