1 unix linux interview questions and answers

8
1. UNIX - LINUX Interview Questions and Answers Written by Shaukat Tuesday, 10 May 2011 18:00 - Last Updated Tuesday, 10 May 2011 18:01 UNIX - LINUX Interview Questions and Answers : 1. How are devices represented in UNIX?  All devices are repr esented by files called spe cial files that are located in/dev dire ctory. Thus, device files and other files are named and acce ssed in the same way. A 'regular file' is just an ordinary data file in the disk . A 'block special file' represen ts a device with characteristics similar to a disk (data transfer in terms of blocks). A 'character special file' represents a device with characteristics similar to a key board (data tr ansfer is by stream of bits in sequential order).  2. What is 'inode'?  All UNIX files have its description stored in a structure called 'inode'. The inode contains info about the file-size, its location, time of last access, time of last modification, permission and so on. Directories are a lso represented as files and have an associated inode. In addition to descriptions abou t the file, the inode contains pointers to the data block s of the file. If the file is large, inode has indirect pointer to a bloc k of pointer s to addition al data bloc ks (this further aggregates for larger files). A block is typically 8k. Inode consists of the following fi elds:  - File owner identifier - File type - File access permissions - File access times - Number of links - File size - Location of the file data 3. Brief about the directory representation in UNIX  A Unix directory is a file con taining a correspond ence between filenames and ino des. A directory is a special file that the kernel maintains. Only kernel modifies directories, but processes can read directories. The contents of a directory are a list of filena me and inode number pairs. Wh en new directories are created, kernel makes two entries named '.' (refers to 1 / 8

Upload: rajasekhar-reddy

Post on 03-Apr-2018

212 views

Category:

Documents


0 download

TRANSCRIPT

7/28/2019 1 Unix Linux Interview Questions and Answers

http://slidepdf.com/reader/full/1-unix-linux-interview-questions-and-answers 1/8

7/28/2019 1 Unix Linux Interview Questions and Answers

http://slidepdf.com/reader/full/1-unix-linux-interview-questions-and-answers 2/8

7/28/2019 1 Unix Linux Interview Questions and Answers

http://slidepdf.com/reader/full/1-unix-linux-interview-questions-and-answers 3/8

7/28/2019 1 Unix Linux Interview Questions and Answers

http://slidepdf.com/reader/full/1-unix-linux-interview-questions-and-answers 4/8

7/28/2019 1 Unix Linux Interview Questions and Answers

http://slidepdf.com/reader/full/1-unix-linux-interview-questions-and-answers 5/8

7/28/2019 1 Unix Linux Interview Questions and Answers

http://slidepdf.com/reader/full/1-unix-linux-interview-questions-and-answers 6/8

7/28/2019 1 Unix Linux Interview Questions and Answers

http://slidepdf.com/reader/full/1-unix-linux-interview-questions-and-answers 7/8

7/28/2019 1 Unix Linux Interview Questions and Answers

http://slidepdf.com/reader/full/1-unix-linux-interview-questions-and-answers 8/8