| Snaprecruit.com

| Snaprecruit.com

Interview question based on skill :

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. Which of the following commands can be used to replace ‘professor’ with ‘director’ throughout the whole file?

Correct Answer is : 1,$s/professor/director/g and %s/professor/director/g

2. Which of the following flag will be used for interactive substitution?

Correct Answer is : gc

3. Which one of the following commands will be used to delete all the instances of string ‘manager’ in file003?

Correct Answer is : 1,$s/manager/ /g

4. Which one of the following command is invalid?

Correct Answer is : :1,%/file01/file02/g

5. Search and replace operations can also use regular expressions for matching multiple patterns.

Correct Answer is : TRUE

6. Which command is used for comparing two files?

Correct Answer is : cmp

7. What is the exit status of cmp command if both the files are identical?

Correct Answer is : 0

8. Which option is used with cmp command to display a detailed list of mismatches?

Correct Answer is : -l

9. Which option is used with cmp command to limit the number of bytes to be compared?

Correct Answer is : -n

10. How can we skip some initial bytes from both the files to be compared?

Correct Answer is : using -i option

11. -b option is used with cmp command to print the differing bytes in both files.

Correct Answer is : TRUE

12. Which command compares two sorted files line by line?

Correct Answer is : comm

13. What will be the command if we want to suppress column 1 and column 2 in the output of comm Command?

Correct Answer is : comm -12

14. For comm command to work properly, files specified should be sorted.

Correct Answer is : TRUE

15. Which command is used to display the differences between files?

Correct Answer is : diff

16. When two files are identical, what is the output of diff command?

Correct Answer is : Returns prompt

17. Which option is used to produce multi columnar output in diff command?

Correct Answer is : -y

18. If we are interested in knowing that whether the two files are identical or not, we can use ___ command.

Correct Answer is : cmp

19. Which of the following is used to compress files?

Correct Answer is : gzip

20. Which one of the following extension is provided by gzip to the compressed filename?

Correct Answer is : .gz