![]() ![]() ![]() Write(filedes,buffer,bytes) - write data to an open file Read(filedes,buffer,bytes) - read data from an open file System call for creating directory is mkdir (pathname, mode). When new directories are created, kernel makes two entries named '.' (refers to the directory itself) and '.' (refers to parent directory). The contents of a directory are a list of filename and inode number pairs. Only kernel modifies directories, but processes can read directories. A directory is a special file that the kernel maintains. A block is typically 8k.īrief about the directory representation in UNIXĪ Unix directory is a file containing a correspondence between filenames and inodes. If the file is large, inode has indirect pointer to a block of pointers to additional data blocks (this further aggregates for larger files). In addition to descriptions about the file, the inode contains pointers to the data blocks of the file. Directories are also represented as files and have an associated inode. The inode contains info about the file-size, its location, time of last access, time of last modification, permission and so on. A 'character special file' represents a device with characteristics similar to a keyboard (data transfer is by stream of bits in sequential order).Īll UNIX files have its description stored in a structure called 'inode'. A 'block special file' represents a device with characteristics similar to a disk (data transfer in terms of blocks). ![]() A 'regular file' is just an ordinary data file in the disk. Thus, device files and other files are named and accessed in the same way. Unix Interview Questions And Answers Īll devices are represented by files called special files that are located in/dev directory. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |