Unix Interview Question and Answers

6. Define directory and filename?
 
  • A directory is a file that contains directory entries. The directory entry containing a file name along with structure of information describing the attributes of the file.
  • The names in a directory are called filename.
  • The only two characters that cannot appear in a file name are / and null character.
7. Define program and process?
 
  • A program is a executable file residing in a disk file. An executing instance of a program is called a process.
  • Every UNIX process have a unique numeric identifier called the process ID.
  • The process ID is always a non negative integer.
8. List down the different file types?
 
  • Regular file
  • Directory file
  • Character special file
  • Block special file
  • FIFO
  • Symbolic link
  • Socket
9. What are the options available to determine the group ID of the new file?
 
  • The group ID of the new file can be the effective group ID of the process
  • The group ID of the new file can be the group ID of the directory in which the file is being created.
10. Define sticky bit?
 
  • The bit S_ISVTX is known as sticky bit.
  • If this bit is set for an executable program file, then the first time the program was executed a copy of the programmer’s text was saved in the swap area when the process terminated.
  • The advantage of using this is the program is loaded into memory faster the next time.
12345678

Page 2 of 8