1. If make command is executed as "make -j 2?, then:
a) two jobs will run simultaneously
b) only two will be executed
c) it will give an error
d) none of the mentioned?

a) two jobs will run simultaneously

2. What is makefile?
a) makefile describes to the make command that how to compile the program
b) makefile contains various statements related with the compilation of target
c) both (a) and (b)
d) none of the mentioned?

a) makefile describes to the make command that how to compile the program

3. Which of these commands will set the permissions on file textfile to read and write for the owner, read for the group, and nothing for everyone else?
a) chmod 046 textfile
b) chmod 640 textfile
c) chmod 310 textfile
d) chmod rw r nil textfile?

b) chmod 640 textfile

4. Binary or executable files are:
a) regular files
b) device files
c) special files
d) directory files?

a) Regular files

5. Which of the following umask settings doesn't allow execute permission to be set by default on directory files?
a) 222
b) 111
c) 000
d) 444

c) 000

6. Which of the following umask settings allow execute permission to be set by default on regular files?
a) 222
b) 111
c) 000
d) None of the given choices

d) None of the given choices

7. The command chmod 4777 a.out:
a) will set the suid bit of a.out
b) will set the suid bit of a.out only if the command is issued by root
c) is not a valid command
d) will set the sticky bit of a.out

a) will set the suid bit of a.out

8. What does chmod +t do?
a) wrong syntax
b) set effective userid for filename
c) set effective groupid for filename
d) set the sticky bit

d) set the sticky bit

9. A user executes the following command successfully:
$ chmod +x file1.txt
Which of the following is true of the output of this command?
a) The command results in adding execute permission to the user who ran this command
b) The command results in adding execute permission for the owner of the file
c) The command results in an error since the file is not an executable file
d) The command results in adding execute permission for all users (i.e., user,group & others)

d) The command results in adding execute permission for all users (i.e., user,group & others)

10. If you are a root user, how can you grand execute permission only for the owner of the file project1?
a. chmod +x project1
b. chmod u+x project1
c. chmod a+x project1
d. chmod U+X project1

b. chmod u+x project1

Download Interview PDF

11. Which command is used to assign read-write permission to the owner?
a) chmod a+r file
b) chmod o+r file
c) chmod u=rw file
d) chmod og-r file

c) chmod u=rw file

12. Which make command option ignores all errors in commands executed to remark files?
a) -i
b) -j
c) -k
d) -l

a) -i

13. Given the command:
$ chmod o-w datafile

a) sets write permission to everyone for datafile
b) sets write permission to others for datafile
c) clears write permission to everyone for datafile
d) clears write permission to others for datafile

d) clears write permission to others for datafile

14. With a umask value of 112, what is the default permission assigned to newly created regular file?
a) -x-x-wx
b) -rw-rw-r-
c) -r-xr-x-r-
d) -rw-rw-r-

d) -rw-rw-r-

15. The permission -rwxr-xr-t represented in octal expression will be:
a) 0777
b) 1755
c) 1754
d) 2754

b) 1755

16. As we type "make" command on the terminal:
a) make reads the makefile in the current directory
b) make reads the makefile in the parent directory
c) make reads the makefile in the predefined environment variable
d) none of the mentioned

a) make reads the makefile in the current directory

17. If we want to get the exit status that specified targets are up to date or not, we have to execute the make command with option:
a) -q
b) -r
c) -s
d) -t

a) -q

18. Which option of make command print the commands that would be executed, but do not execute them?
a) -m
b) -n
c) -o
c) -p

b) -n

19. If our makefile is named as "google", then which one of the following command will compile the code with this makefile:
a) make -a google
b) make -f google
c) make sanfoudry
d) make

b) make -f google

20. The command "make google" will:
a) create the executable if google.c file is present in the current directory
b) create the object file named as google.o
c) give an error
d) none of the mentioned

a) create the executable if google.c file is present in the current directory

21. The makefile starts executing from:
a) first target
b) first target whose name starts with "."
c) first target whose name does not starts with "."
d) none of the mentioned

c) first target whose name does not starts with "."

22. What is phony target in the makefile?
a) the target which is not a filename
b) the target which is a filename
c) the target which does not used for compilation
d) none of the mentioned

a) the target which is not a filename

23. Which one of the following provides all dependencies in the makefile?
a) $^
b) $*
c) $:
d) none of the mentioned

a) $^

24. When a target of makefile fails to execute:
a) make does not executes any other target dependent on it
b) it returns a status
c) both (a) and (b)
d) none of the mentioned

c) both (a) and (b)

25. Which one of the following is not a valid makefile directive?
a) if
b) elif
c) endif
d) none of the mentioned

d) none of the mentioned

Download Interview PDF

26. In the make-file the target and dependencies are separated by the character:
a) -
b) :
c) /
d) none of the mentioned

b) :

27. Which one of the following is used for the target file-name in the make-file?
a) $@
b) $*
c) $?
d) none of the mentioned

a) $@

28. Macros for the make-file can be defined in:
a) makefile
b) command line
c) both (a) and (b)
d) none of the mentioned

c) both (a) and (b)

29. Which one of the following can be used to specify the directory to search the dependencies and target files?
a) VPATH
b) CPATH
c) FPATH
d) none of the mentioned

a) VPATH

30. Running "make" command without the arguments starts the target ____ in the makefile.
a) ".phony"
b) "clean"
c) first
d) none of the mentioned

c) first

31. In make-file the comment begins with the character:
a) $
b) #
c) /*
d) none of the mentioned

b) #

32. If the umask value is 0002. What will be the permissions of new directory:
a) 777
b) 775
c) 774
d) 664

b) 775

33. If we want to execute the make-file by just giving the "make" command, make-file should be named as:
a) Make-file
b) makefile
c) MAKEFILE
d) none of the mentioned

a) Makefile

34. The permission -rwxr-sr- represented in octal expression will be:
a) 0777
b) 2766
c) 2744
d) 2754

d) 2754

35. A user does a chmod operation on a file. Which of the following is true?
a) The last accessed time of the file is updated
b) The last modification time of the file is updated
c) The last change time of the file is updated
d) None of the above

c) The last change time of the file is updated

36. Sticky bit can be set using following permission:
a) 0777
b) 2666
c) 4744
d) 1711

d) 1711

37. What is the command to set the execute permissions to all the files and sub-directories within the directory /home/user1/direct:
a) chmod -r +x /home/user1/direct
b) chmod -R +x /home/user1/direct
c) chmod -f -r +x /home/user1/direct
d) chmod -F +x /home/user1/direct

b) chmod -R +x /home/user1/direct

38. If user tries to remove (rm) a readonly file (444 permission), what will happen?
a) The file is removed successfully (and silently)
b) The rm command prompts for a confirmation, the command is successful upon confirmation
c) The rm command prompts for a confirmation, however the operation fails because of insufficient permissions
d) The rm command fails because of insufficient permissions

b) The rm command prompts for a confirmation, the command is successful upon confirmation

39. The permission -rwSr-r- represented in octal expression will be:
a) 0777
b) 2666
c) 4744
d) 4644

d) 4644

40. Effective group id can be set using following permission:
a) 0777
b) 2666
c) 4744
d) 1711

b) 2666

Download Interview PDF

41. Effective user id can be set using following permission:
a) 0777
b) 2666
c) 4744
d) 1711

c) 4744

42. The file permission 764 means:
a) Every one can read, group can execute only and the owner can read and write
b) Every one can read and write, but owner alone can execute
c) Every one can read, group including owner can write, owner alone can execute
d) Every one can read and write and execute

c) Every one can read, group including owner can write, owner alone can execute

43. The permission -rwxr-r- represented in octal expression will be:
a) 777
b) 666
c) 744
d) 711

c) 744

44. srwxr-xrw- is a:
a) internet socket file
b) unix domain socket file
c) symbolic link
d) shared file

b) unix domain socket file

45. The soft link will increase the link counter of the file (T/F):
a) True
b) False

b) False

46. When you use the ln command, which of the following occurs?
a) a file is created that points to an existing file
b) a file is created that is a copy of an existing file
c) a file is moved from one location to another
d) a file is renamed

a) a file is created that points to an existing file

47. The directory file contains:
a) File names & File Sizes
b) File names & Inode Numbers
c) File names & Address
d) File names & Permissions

b) File names & Inode Numbers

48. Which of the following is not a valid file type on Linux?
a) Socket
b) Soft-link
c) Inode
d) FIFO

c) Inode

49. Which directory contain device special files?
a /etc
b) /etc/dev
c) /root/bin
d) /dev

d) /dev

50. Which are the two types of device files?
a) Character & Block
b) Character & Socket
c) Block & FIFO
d) Input & output

a) Character & Block

51. Which is an example for block special file?
a) Virtual Terminal
b) CD-ROM
c) Terminal
d) Serial modem

b) CD-ROM

52. Which of the following is not correct statement regarding file types?
a) Hard links share same inode number
b) Soft links cannot be created across partitions
c) Socket files are Unix domain sockets
d) Character file is a special file

b) Soft links cannot be created across partitions

53. Which is an example for character special file?
a) Hard disk
b) CD-ROM
c) Terminal
d) Memory

c) Terminal

54. All device files are stored in which directory?
a) /etc
b) /bin
c) /dev
d) /usr

c) /dev