InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
To replace | with ~, which one of the following commands will be used?(a) tr ‘|\’‘~-‘(b) tr ‘|\’‘~-‘ > emp.lst(c) tr |~ emp.lst(d) !I got this question in an interview for job.My question comes from Unique and tr Command in division Simple Filters of Unix |
|
Answer» The correct answer is (b) tr ‘|\’‘~-‘ > emp.lst |
|
| 2. |
Which option is used with tr command for deleting characters?(a) -d(b) -c(c) -n(d) -aThis question was addressed to me by my school principal while I was bunking the class.I need to ask this question from Unique and tr Command in division Simple Filters of Unix |
|
Answer» Right OPTION is (a) -d |
|
| 3. |
______ option is used for compressing multiple consecutive characters.(a) -d(b) -c(c) -n(d) -sThe question was posed to me in a job interview.My doubt stems from Unique and tr Command in section Simple Filters of Unix |
|
Answer» The correct choice is (d) -s |
|
| 4. |
Which command is used for translating characters?(a) sort(b) trans(c) tr(d) pasteThe question was asked during a job interview.I'm obligated to ask this question of Unique and tr Command topic in chapter Simple Filters of Unix |
|
Answer» The correct choice is (c) tr |
|
| 5. |
______ option is used for counting frequency of occurrence.(a) -d(b) -c(c) -u(d) -aThe question was posed to me in class test.I want to ask this question from Unique and tr Command topic in division Simple Filters of Unix |
|
Answer» Correct CHOICE is (B) -C |
|
| 6. |
Which option is used for selecting repeated entries?(a) -d(b) -c(c) -u(d) -aI have been asked this question in my homework.My question is from Unique and tr Command in division Simple Filters of Unix |
|
Answer» The CORRECT choice is (a) -d |
|
| 7. |
Which option is used with uniq command for selecting non-repeated lines?(a) -i(b) -c(c) -u(d) -aI have been asked this question in an interview for internship.My question comes from Unique and tr Command in chapter Simple Filters of Unix |
|
Answer» CORRECT ANSWER is (c) -u For explanation I would say: To select unique lines, we can use the sort -u command. But uniq also offers an option (-u)which is used for SELECTING non-repeating ENTRIES in a field. For example, |
|
| 8. |
Which command is used for locating repeated and non-repeated lines?(a) sort(b) uniq(c) cut(d) pasteThis question was addressed to me by my college director while I was bunking the class.This key question is from Unique and tr Command in section Simple Filters of Unix |
|
Answer» The correct choice is (b) uniq |
|
| 9. |
uniq command requires a sorted file as input.(a) True(b) FalseI had been asked this question during an interview for a job.My question is taken from Unique and tr Command topic in chapter Simple Filters of Unix |
|
Answer» Correct OPTION is (a) True |
|
| 10. |
Which option is used with sort command to sort multiple files collectively?(a) -m(b) -n(c) -c(d) -oThe question was asked during an online exam.This interesting question is from Sort Command topic in portion Simple Filters of Unix |
|
Answer» The CORRECT option is (a) -m |
|
| 11. |
To check whether the file has actually been stored in the default order, we can use ____ option.(a) -n(b) -a(c) -d(d) -cThe question was posed to me in a job interview.I'm obligated to ask this question of Sort Command topic in division Simple Filters of Unix |
|
Answer» Right choice is (d) -c |
|
| 12. |
Which option is used by the sort command to redirect the output to a specified file?(a) -n(b) -t(c) -o(d) -uThis question was posed to me by my school principal while I was bunking the class.This interesting question is from Sort Command topic in chapter Simple Filters of Unix |
|
Answer» Correct choice is (c) -o |
|
| 13. |
_____ option is used with sort command for removing repeated lines.(a) -n(b) -u(c) -t(d) -aI had been asked this question in an online quiz.The question is from Sort Command in portion Simple Filters of Unix |
|
Answer» Right choice is (b) -u |
|
| 14. |
The name of the input and output files cannot be same while using sort command.(a) True(b) FalseThis question was addressed to me in examination.This interesting question is from Sort Command in section Simple Filters of Unix |
|
Answer» The correct choice is (b) False |
|
| 15. |
Which option is used when we’ve to sort files containing only numbers?(a) -n(b) -a(c) -d(d) -uThe question was posed to me in exam.My query is from Sort Command topic in chapter Simple Filters of Unix |
|
Answer» The correct CHOICE is (a) -n |
|
| 16. |
The sort order can be reversed using ___ option.(a) -t(b) -k(c) -r(d) -nThis question was addressed to me in an online quiz.The query is from Sort Command topic in section Simple Filters of Unix |
|
Answer» Right OPTION is (c) -r |
|
| 17. |
Which option is used with sort command to specify the field delimiter?(a) -a(b) -t(c) -k(d) -nI have been asked this question during an internship interview.I need to ask this question from Sort Command in portion Simple Filters of Unix |
|
Answer» Right answer is (B) -t |
|
| 18. |
We can perform sorting on secondary key also using sort command.(a) True(b) FalseThis question was addressed to me by my college professor while I was bunking the class.This intriguing question originated from Sort Command topic in chapter Simple Filters of Unix |
|
Answer» Correct answer is (a) True |
|
| 19. |
Which option is used for sorting a file according to primary key?(a) -t(b) -k(c) -n(d) -nThe question was asked in an online quiz.I would like to ask this question from Sort Command topic in portion Simple Filters of Unix |
|
Answer» Correct choice is (b) -k |
|
| 20. |
We cannot perform sorting on columns using sort command.(a) True(b) FalseThe question was asked in homework.My enquiry is from Sort Command topic in section Simple Filters of Unix |
|
Answer» Correct answer is (b) False |
|
| 21. |
Sort command uses ____ as default field delimiter.(a) tab(b) single space(c) double tab(d) one or more continuous spacesThis question was addressed to me in an interview for internship.Asked question is from Sort Command in chapter Simple Filters of Unix |
|
Answer» Correct option is (d) ONE or more CONTINUOUS spaces |
|
| 22. |
____ command is used for sorting a file on specified fields.(a) cut(b) sort(c) pr(d) tailThe question was posed to me in a national level competition.The doubt is from Sort Command topic in portion Simple Filters of Unix |
|
Answer» Right option is (B) sort |
|
| 23. |
By default, sort command reorders lines in ASCII collating sequence.(a) True(b) FalseI had been asked this question by my college professor while I was bunking the class.I'd like to ask this question from Sort Command topic in portion Simple Filters of Unix |
|
Answer» Correct CHOICE is (a) True |
|
| 24. |
Which option is used with paste command for joining lines?(a) -s(b) -c(c) -a(d) -eI have been asked this question in an interview.This intriguing question originated from Filtering Commands topic in portion Simple Filters of Unix |
|
Answer» The correct answer is (a) -s |
|
| 25. |
_____ option is used with paste command if we want to specify our own delimiter.(a) -d(b) -c(c) -a(d) -eThe question was asked during a job interview.My question is from Filtering Commands topic in division Simple Filters of Unix |
|
Answer» The correct option is (a) -d |
|
| 26. |
paste command uses space as the default field delimiter.(a) True(b) FalseThe question was posed to me in exam.My enquiry is from Filtering Commands topic in division Simple Filters of Unix |
|
Answer» Right option is (b) False |
|
| 27. |
Whatever we have cut using cut command can be pasted back using paste command but vertically.(a) True(b) FalseThis question was posed to me during an internship interview.This key question is from Filtering Commands in section Simple Filters of Unix |
|
Answer» Correct choice is (a) True |
|
| 28. |
Which command is used for pasting files?(a) cut(b) paste(c) tail(d) headThe question was posed to me during an interview.I would like to ask this question from Filtering Commands topic in portion Simple Filters of Unix |
|
Answer» Right ANSWER is (b) paste |
|
| 29. |
Which one of the following commands is incorrect?(a) $ cut -d “|”-f1,4emp.lst(b) $ cut -c -3 emp.lst(c) $ tail -c 511 foo(d) $ tail -c fooThe question was asked in an online interview.This key question is from Filtering Commands in portion Simple Filters of Unix |
|
Answer» RIGHT choice is (d) $ tail -c foo For explanation I WOULD say: tail(1) COMMAND is used for extracting bytes instead of lines while cut(1) command is used for extracting columns and fields. But if we are using tail(1) command, we have to SPECIFY an integer value after the -c option, otherwise, the command will fail. |
|
| 30. |
We have to specify whether we want to cut fields or columns while using cut command.(a) True(b) FalseThis question was addressed to me by my college director while I was bunking the class.This interesting question is from Filtering Commands topic in portion Simple Filters of Unix |
|
Answer» Right CHOICE is (a) True |
|
| 31. |
Which option is used with the cut command for cutting field base on the value of our specified delimiter?(a) -a(b) -f(c) -d(d) -eI have been asked this question during an interview.I need to ask this question from Filtering Commands in chapter Simple Filters of Unix |
|
Answer» The correct answer is (c) -d |
|
| 32. |
What is the default delimiter used by the cut command for cutting fields?(a) space(b) tab(c) double tab(d) underscoreI have been asked this question in final exam.My doubt is from Filtering Commands topic in division Simple Filters of Unix |
|
Answer» The correct answer is (b) tab |
|
| 33. |
____ option is used with the cut command for cutting fields.(a) -c(b) -n(c) -f(d) -aThe question was asked in class test.Question is from Filtering Commands topic in chapter Simple Filters of Unix |
|
Answer» Right choice is (c) -f |
|
| 34. |
The expressioncut -c -3 emp.lst will cut columns number _____(a) 3(b) 1(c) 1-3(d) 0I have been asked this question in a national level competition.My question is from Filtering Commands topic in division Simple Filters of Unix |
|
Answer» The correct choice is (c) 1-3 |
|
| 35. |
To extract specific columns from a file, ____ command is used.(a) tail(b) head(c) pr(d) cutThis question was posed to me in final exam.Asked question is from Filtering Commands in section Simple Filters of Unix |
|
Answer» Correct answer is (d) cut |
|
| 36. |
Which option is used with the tail command for extracting bytes instead of lines?(a) -f(b) -n(c) -c(d) -aThe question was posed to me in an international level competition.Enquiry is from Filtering Commands in chapter Simple Filters of Unix |
|
Answer» Correct answer is (c) -c |
|
| 37. |
Which of the following command is incorrect?(a) pr dept.lst(b) head -n 5 emp.lst(c) tail -o+5 emp.lst(d) tail -3 emp.lstThis question was addressed to me in homework.My question is from Filtering Commands topic in portion Simple Filters of Unix |
|
Answer» The correct choice is (c) tail -o+5 emp.lst |
|
| 38. |
Which symbol is used with the tail command to print the file from the selected line?(a) +(b) –(c) %%(d) ^I had been asked this question in my homework.This intriguing question originated from Filtering Commands in chapter Simple Filters of Unix |
|
Answer» Correct choice is (a) + |
|
| 39. |
We can also use -n option with tail command.(a) True(b) FalseI had been asked this question during an interview.I want to ask this question from Filtering Commands in division Simple Filters of Unix |
|
Answer» Correct choice is (a) True |
|
| 40. |
___ command is used for displaying the end of the file.(a) head(b) tail(c) lp(d) prThe question was posed to me during an interview for a job.I would like to ask this question from Filtering Commands in section Simple Filters of Unix |
|
Answer» Right answer is (b) tail |
|
| 41. |
Which option is used with the head command to specify line count to display?(a) -a(b) -h(c) -n(d) -oI got this question in quiz.The above asked question is from Filtering Commands topic in chapter Simple Filters of Unix |
|
Answer» RIGHT CHOICE is (C) -n The explanation: We can use the -n OPTION with the head command to specify a LINE count and display a specific number of lines of the file. -n option is followed by an integer value which donates the number of lines to be displayed. For example, |
|
| 42. |
By default, how many lines are displayed using the head command?(a) 5(b) 10(c) 4(d) 20This question was posed to me in an international level competition.Query is from Filtering Commands in portion Simple Filters of Unix |
|
Answer» The CORRECT option is (b) 10 |
|
| 43. |
Which command is used for displaying the beginning of a file?(a) pr(b) head(c) begin(d) lpThe question was posed to me by my college director while I was bunking the class.Query is from Filtering Commands topic in division Simple Filters of Unix |
|
Answer» The correct choice is (b) HEAD |
|
| 44. |
___ operator is used with pr command to start printing from a specific page.(a) –(b) #(c) +(d) &I got this question during an interview.Origin of the question is Filtering Commands in division Simple Filters of Unix |
|
Answer» The correct option is (c) + |
|
| 45. |
Which option is used with pr command to display output along with line numbers?(a) -d(b) -n(c) -o n(d) -tI have been asked this question at a job interview.This intriguing question originated from Filtering Commands topic in division Simple Filters of Unix |
|
Answer» Right option is (b) -n |
|
| 46. |
-h option is used with pr command to add a header of our choice.(a) True(b) FalseI got this question at a job interview.Question is from Filtering Commands in portion Simple Filters of Unix |
|
Answer» The correct choice is (a) True |
|
| 47. |
Which option is used with pr command to suppress the header and footers?(a) -p(b) -k(c) -t(d) -nThis question was addressed to me by my college director while I was bunking the class.This intriguing question originated from Filtering Commands topic in chapter Simple Filters of Unix |
|
Answer» Correct answer is (C) -t |
|
| 48. |
Which option is used with pr command for printing multi-columnar output?(a) -p(b) -k(c) -d(d) -prThe question was asked in an interview.My question is from Filtering Commands in section Simple Filters of Unix |
|
Answer» The correct CHOICE is (b) -k |
|
| 49. |
pr command adds ____ lines of margin at the top and bottom.(a) 5(b) 4(c) 2(d) 1This question was posed to me in quiz.The origin of the question is Filtering Commands topic in chapter Simple Filters of Unix |
|
Answer» Right choice is (a) 5 |
|
| 50. |
Which command is used for preparing a file for printing?(a) cd(b) cat(c) print(d) prI had been asked this question in an internship interview.I'd like to ask this question from Filtering Commands in division Simple Filters of Unix |
|
Answer» CORRECT OPTION is (d) PR To explain I would say: The pr COMMAND is used for PREPARING a file by adding suitable headers, footers and formatted text. This command is used with a filename as an argument. For example, |
|