GkSeries.com

Basic Linux Multiple Choice Questions(MCQs)& Answers | Linux Questions & Answers

61 Which one shows the name of the operating system?
[A] uname -n
[B] uname -r
[C] uname -o
[D] uname –m
Answer: Option [C]
62 How do you add (append) a file “file1? to the example.tar file
[A] no you cannot add a file to example.tar
[B] tar -cvf example.tar file1
[C] tar -rvf file1 example.tar
[D] tar -evf file1 example.tar
Answer: Option [C]
63 How to execute ls command inside a vi editor?
[A] !ls
[B] :ls
[C] :!ls
[D] we can’t execute
Answer: Option [C]
64 Which command gives the first byte where the difference is in the file1 & file2?
[A] diff
[B] cmp
[C] ls -a
[D] comm
Answer: Option [B]
65 To open a file file1 with cursor at line number 4
[A] vi +num file1
[B] vi +set num file1
[C] vi + “set num” file1
[D] vi +/se nu file1
Answer: Option [A]
66 sed is a command typically used for
[A] Perform complex calculations
[B] Perform FIFO based non-blocking I/O
[C] Modify/print selective contents of a file
[D] None of the mentioned
Answer: Option [C]
67 What communication command provides communication to another user logged on by writing to the bottom of their terminal?
[A] talk
[B] write
[C] chat
[D] transmit
Answer: Option [A]
68 Which screen manipulation command sets the screen back to normal?
[A] tput cup
[B] tput smso
[C] tput rmso
[D] tput blink
Answer: Option [C]
69 Which command will you use to see the available routes?
[A] show route
[B] route status
[C] netstat -r
[D] none of the mentioned
Answer: Option [C]
70 Which of the following time stamps need not exist for a file on traditional unix file system
[A] Access Time
[B] Modification Time
[C] Creation Time
[D] Change Time
Answer: Option [C]
71 Which command is used to set limits on file size
[A] fsize
[B] flimit
[C] ulimit
[D] usize
Answer: Option [C]
72 Which option of rmdir command will remove all directories a, b, c if path is a/b/c
[A] –b
[B] –o
[C] –p
[D] –t
Answer: Option [C]
73 Which represents the user home directory
[A] /
[B] .
[C] ..
[D] ~
Answer: Option [D]
74 If a file is removed in Unix using ‘rm’ then
[A] The file can be recovered by a normal user
[B] The file cannot be recovered by a user
[C] The file can be fully recovered provided the sytem is not rebooted
[D] The file will be moved to /lost+found directory and can be recovered only by administrator’s intervention
Answer: Option [B]
75 Executing the ‘cd ..’ command when at the root level causes
[A] Error message indicating the user can’t access beyond the root level
[B] Behavior is unix-flavor dependent
[C] Nothing happens
[D] Results in changing to the ‘home’ directory
Answer: Option [D]
76 How do you rename file “new” to file “old”?
[A] mv new old
[B] move new old
[C] cp new old
[D] rn new old
Answer: Option [A]
77 What command is used to copy files and directories?
[A] copy
[B] cp
[C] rn
[D] cpy
Answer: Option [B]
78 When mv f1 f2 is executed which file’s inode is freed?
[A] f1
[B] f2
[C] new inode will be used
[D] implementation dependent
Answer: Option [B]
79 Any file’s attribute information is stored in which structure on the disk
[A] Inode
[B] Data blocks
[C] File blocks
[D] Directory file
Answer: Option [A]
80 By default if any regular file is created, the number of link is displayed as 1 ?
[A] True
[B] False
[C] May be true or false
[D] Can't be determined
Answer: Option [A]