Linux Operating System Online Mock Test

Linux Operating System Online Mock Test

1.Which command is use to list one per line ?
(A) ls -t
(B) ls -F
(C) ls -1 ✔️
(D) ls –r

2.Which command is use to list the files and mark all executable file with * and directories with / symbol ?
(A) ls -t
(B) ls -F ✔️
(C) ls -l
(D) ls -r

3.Which wildcard characters used for matching a pattern as per requirement ?
(A) *
(B) ?
(C) =
(D) ((A) and ((B) ✔️

4.Which wildcard characters used for a single character?
(A) *
(B) ? ✔️
(C) [abc]
(D) [!abc]

5.Which wildcard characters used for a single character either a, b or c ?
(A) [ab]c
(B) [abcd]
(C) [abc] ✔️
(D) [!abc]

6.Which wildcard use to match any number of characters including none ?
(A) * ✔️
(B) ?
(C) [abc]
(D) [!abc]

7.Which wildcard characters used for match single character other than a, b or c?
(A) *
(B) ?
(C) [abc]
(D) [!abc] ✔️

8.Which wildcard use a single character that is not within the ASCII range of the characters p to s ?
(A) [p-s]
(B) [!p-s] ✔️
(C) [p*s]
(D) [p#s]

9.Which wildcard match any single character within the ASCII range of the characters p to s.
(A) [p-s] ✔️
(B) [!p-s]
(C) [p*s]
(D) [p#s]

10.Which command will be used to create a copy of file called naresh with new file rahul?
(A) copy rahul naresh
(B) copy naresh rahul
(C) cp rahul naresh
(D) cp naresh rahul ✔️

11.Which command copies a file or group of files?
(A) cp ✔️
(B) copy
(C) photocopy
(D) duplicate

12.Which command will be used to copy files test1, test2, test3 to the directory named naresh ?
(A) cp naresh test1 test2 test3
(B) cp naresh test1, test2, test3
(C) cp test1 test2 test3 naresh ✔️
(D) copy test1 test2 test3 naresh

13.cp command creates an exact image of a file on the disk with a____file name.
(A) same
(B) special
(C) different
(D) extra ✔️

14.In cp command, which is the first argument?
(A) destination file
(B) source file ✔️
(C) ((A) or ((B)
(D) None of these

15.cp command needs ____arguments.
(A) two ✔️
(B) three
(C) four
(D) five

16.In cp command, which is the second argument?
(A) destination file ✔️
(B) source file
(C) ((A) or ((B)
(D) None of these

17.To rename the me naresh to rahul, which command will be used?
(A) mv naresh rahul ✔️
(B) mv rahul dhatri
(C) move naresh rahul
(D) m nareshdhatri

18.Which command will be used to move files test1, test2, test3 to the directory named naresh ?
(A) mv test1, test2, test3 naresh
(B) move test1 test2 test3 naresh
(C) mv test1 test2 test3 naresh ✔️
(D) mv tejas test2 test3 naresh

19.Which command is used to view one page contents on the screen at a time?
(A) more ✔️
(B) move
(C) page
(D) view

20.Which command will be used to rename a directory named Ahmedabad to Amdavad ?
(A) inv Ahmedabad, Amdavad
(B) mv Ahmedabad Amdavad ✔️
(C) mv Amdavad ,Ahmedabad
(D) mv Amdavad Ahmedabad

21.The more command can be used to display the contents of file _.
(A) width wise
(B) name wise
(C) type wise
(D) page wise ✔️

22.Which key is used to view the next pages in more command?
(A) m
(B) p
(C) b
(D) f ✔️

23.Which key is used to view the previous pages in more command?
(A) f
(B) b ✔️
(C) p
(D) m

24.To view the file naresh.txt as page wise, which command will be used?
(A) more nareshtxt ✔️
(B) move naresh.txt
(C) page naresh.txt
(D) pagewise naresh.txt

25.The extension of the cmp command is the ___command.
(A) diff ✔️
(B) cmp
(C) more
(D) compare

26.Which command is used to compares two files of any type and writes the result to the standard output?
(A) diff
(B) cmp ✔️
(C) more
(D) compare

27.The ____command compares two files and displays the contents of both files indicating where the difference lies.
(A) diff ✔️
(B) cmp
(C) more
(D) compare

28.wc command comes with ____options.
(A) two
(B) three ✔️
(C) four
(D) five

29.Which command will be used to count the number of lines, words and characters in the specified file or files?
(A) wf
(B) wa
(C) wc ✔️
(D) wl

30.with which options wc command is used ?
(A) -l
(B) -w
(C) -c
(D) All of these ✔️

31.Which option will be used for counting words with wc command?
(A) wc -c
(B) wc -a
(C) wc -w ✔️
(D) wc -I

32.Which command will be used to rename a file or directory?
(A) rename
(B) mv ✔️
(C) move
(D) rd

33.Which symbol will be used to any position when the user doesn’t have that particular permission?
(A) asterisk (*)
(B) hyphen (-) ✔️
(C) question mark(?)
(D) hash (#)

34.Which character option means to permit to execute the file?
(A) p
(B) e
(C) x
(D) w

35.The set of three characters after the file type show in column ____tells which permission the owner of the file has.
(A) 2 to 4 ✔️
(B) 5 to 7
(C) 8 to 10
(D) 11 to 13

36.The set of three characters after the file type show in column ___tells which permission the other user or group the file has.
(A) 2 to 4
(B) 5 to 7
(C) 8 to 10 ✔️
(D) 11 to 13

37.The set of three characters after the file type show in column ___tells which permission the group of the file has.
(A) 2 to 4
(B) 5 to 7 ✔️
(C) 8 to 10
(D) 11 to 13

38.We use ___number system for representing permission as numeric value.
(A) octal ✔️
(B) decimal
(C) binary
(D) all of these

39.Which octal number allows no permission assigned?
(A) 0 ✔️
(B) 1
(C) 2
(D) 3

40.Which option will be used for counting lines with wc command?
(A) wc -I ✔️
(B) wc -c
(C) wc -a
(D) wc -w

41.Which option will be used for counting a character with wc command?
(A) wc -a
(B) wc -c ✔️
(C) wc -I
(D) wc -w

42.To count number of words in file naresh.txt, which command will be used?
(A) wc –w / naresh.txt
(B) wc –w, naresh.txt
(C) wc naresh.txt –w
(D) wc –w naresh.txt ✔️

43.To count the number of lines in file naresh.txt, which command will be used?
(A) wc -l naresh.txt ✔️
(B) wc naresh -l
(C) wc -l naresh.txt
(D) wc -l / naresh.txt

44.To count number of characters in file naresh.txt, which command will be used?
(A) wc –c, naresh.txt
(B) wc –c naresh.txt ✔️
(C) wc naresh.txt / -w
(D) wc –w / naresh.txt

45.An object can be categorized as a.
(A) regular file
(B) a directory
(C) process
(D) All of these ✔️

46.Which command is equivalent to wc –l –w –c naresh.txt?
(A) wc –lwc, naresh.txt
(B) wc –lwc / naresh.txt
(C) wc –lwc naresh.txt ✔️
(D) wc –l, -w, -c naresh

47.The character ____in the first column refer to a file.
(A) – ✔️
(B) *
(C) d
(D) all of these

48.An object in linux has ___permissions.
(A) 1
(B) 2
(C) 3
(D) 4

49.The character ___in the first column refer to a directory.
(A) –
(B) *
(C) d ✔️
(D) all of these

50.Which character option means to permit it to write the file?
(A) w ✔️
(B) p
(C) x
(D) r