November 27, 2019

Systems Programming- MCQS

Note: We have tried to upload as much as we can, all the question and answers might be shuffled - Please find the answer below each question, some answers might be wrong please review on the last date(some answers might be changed) if you find any wrong answer please comment down below.


Question: 1
Which command helps user to find all options of a command?
Select one:
A. input
B. man
C. help
D. manual
Correct Answer: man

Question: 2
____ is the meta character used to match zero or more characters.
Select one:
A. +
B.  .
C. ?
D.  *
Correct Answer: *

Question: 3
The Octal number to be given alogn with chmod command to make a file readable, writable and executable to the owner, readable and executable to group and others is:
Select one:
A. 555
B. 755
C. 000
D. 744
Correct Answer: 755

Question: 4
Second block in file system layout comprises of
Select one:
A. Boot block
B. Inode block
C.  Data block
D. Super block
Correct Answer: Super block

Question: 5
Super block describes the state of a file system. Which of the statement is false
Select one:
A. Where to find free space on the file system
B. How large the file is
C. How many files it can store
D. How small the file is
Correct Answer: How small the file is

Question: 6
Which command is used for file system self-consistency?
Select one:
A. fcheck
B. fsck
C.  df
D. du
Correct Answer: fsck

Question: 7
Unix is a
Select one:
A. Only one user
B. Single User, Multi-tasking OS
C. Single User, Single tasking OS
D. Multi-User, Multi- tasking OS
Correct Answer: Multi-User, Multi- tasking OS

Question: 8
Which command is used to remove a file?
Select one:
A. mv
B.  remove
C. del
D. rm
Correct Answer: rm

Question: 9
Inodes are unique ______
Select one:
A. across file system
B. across directory
C. within directory
D. within file system
Correct Answer: across file system

Question: 10
Which of the following is true w.r.t Absolute and Relative path addressing
Select one:
A. All of the above
B. Typically, the first name is the top level of the hierarchical specification of the path. The last name is the file or directory the path identifies.
C. All platforms have a method for describing the paths for files & directories
D. You need specify a path as a series of names separated by separator characters
Correct Answer: All platforms have a method for describing the paths for files & directories

Question: 11
The command which transcribes the standard input to the standard output and also makes a copy of the same in a file is
Select one:
A. sort
B. grep
C. tr
D. tee
Correct Answer: tee

Question: 12
Select command is used to sort the lines of data in a file in reverse order
Select one:
A.  Sh -r
B. sort -r
C. St
D. Sort -rev
Correct Answer: sort -r

Question: 13
Which command takes you always to home directory?
Select one:
A. cd \home
B. cd ..
C. cd .
D. d
Correct Answer: cd \home

Question: 14
 _____ is the command used for pattern matching.
Select one:
A. tail
B. sort
C. head
D. grep     
Correct Answer: grep

Question: 15
Select the command with option which is used to count just the number of characters in a file.
Select one:
A. wc  -w
B. wc  -c
C. wc  - 1
D. wc  -r
Correct Answer: wc  -c

Question: 16
How do you create hardlink for the file wipro.txt
Select one:
A. ln -s wipro.txt   wiprolink
B. ln wipro.txt  wiprolink
C.  ln -h wipro.txt   wiprolink
D. None of the above
Correct Answer: ln wipro.txt  wiprolink

Question: 17
Identify the command which is used to update access and modification times of a file.
Select one:
A. grep
B. cat
C. touch
D. wc
Correct Answer: touch

Question: 18
Identify the  command is used to assign execute permission to  files starting with the string emp and ending with 1,2, or 3
Select one:
A. chmod 777 emp*
B. chmod u+r ??? emp
C. chmod u+x emp[1-3]
D. chmod 222 emp?
Correct Answer: chmod u+x emp[1-3]

Question: 19
which block describes the state of a file system?
Select one:
A. status block
B. boot block
C. data block
D. super block
Correct Answer: super block

Question: 20
_____ is the default file descriptor for standard input.
Select one:
A. 1
B. 0
C. 2
D. 3
Correct Answer: 0

Question: 21
Which one of the following is not character device?
Select one:
A. tapes
B. line printers
C. main memory
D.  terminals
Correct Answer: main memory

Question: 22
Major number in device file is
Select one:
A. Index value of the FDT
B. Index value to the kernel table
C. Index value of File Table
D. Index value of Inode table
Correct Answer: Index value to the kernel table

Question: 23
Which command is used to copy all files having the string chap and any two characters after that to the Progs directory?
Select one:
A. cp chap[12]  /progs/*.*
B. cp chap*  progs
C. cp chap?? /progs/*
D. cp chap??   Progs
Correct Answer: cp chap?? /progs/*

Question: 24
Identify command is used to display the processes of the linux?
Select one:
A. more
B. head
C. top
D. grep
Correct Answer: more

Question: 25
Which of the following command is used to list contents of directories?
Select one:
A. lp
B.  ls
C.  dir
D. tar
Correct Answer: ls

Question: 26
I have already created a file with name “sp” in current directory using cat command. If you want to create again file with existing name in current directory using same command then,
Select one:
A. Existing file name sp will be overwritten
B. A separate new file sp1 will be created
C. Existing file name sp is deleted
D. File cannot create
Correct Answer: Existing file name sp will be overwritten

Question: 27
When a link count  becomes zero, system removes ________
Select one:
A. node
B. Superblock
C. Whole directory
D. Both a) and c)
Correct Answer: node

Question: 28
____ is the octal value for assigning
              - read, write and execute permission for owner
                 - only read permission to group
               - only execute permission to others
Select one:
A. 622
B. 777
C. 741
D. 714
Correct Answer: 741

Question: 29
Which command allows to create file at command prompt. It also helps to display contents in the screen.
Select one:
A. pr
B. touch
C.  od
D. cat
Correct Answer: cat

Question: 30
Select the command is used to display the directory attributes rather than its contents.
Select one:
A. ls  -F
B. ls  -l -d
C. ls  -l
D. ls  -x
Correct Answer: ls  -l -d

Question: 31
The command chmod u+x wims signifies
Select one:
A. All of the above
B. Read/write and execute permission are added to owner for the file wims
C. Execute permission is added to owner for the file wims
D. Only write permission is added to owner for the file wims
Correct Answer: Execute permission is added to owner for the file wims

Question: 32
Which command helps us to find inode change time?
Select one:
A. ls -li
B. ls -lu
C. ls -lc
D. ls -l
Correct Answer: ls -li

Question: 33
Which option is used with rm command to make the command prompt the user with each filename and a ?, before acting on it
Select one:
A.   -1
B. -r
C. -x
D. -i
Correct Answer: -i

Question: 34
What would be the output of the command ls
Select one:
A. Displays all the files in parent directory
B. Displays all the files & directories in the current directory
C. Displays all the files in current directory
D. Displays all the files & directories in the parent directory
Correct Answer: Displays all the files & directories in the current directory

Question: 35
Which symbol will be used with grep command to match the pattern pat at the beginning of a line?
Select one:
A. pat^
B.  $pat
C. ^pat
D. pat$
Correct Answer: ^pat

Question: 36
Which of the following commands is used to obtain a list of all files with inode number?
Select one:
A. ls  -1
B.  ls  -R
C. ls  -t
D. ls  -li
Correct Answer: ls  -li

Question: 37
select the command which is used to sends the word count of the file infile to the newfile.
Select one:
A. wc infile | newfile
B. wc infile > newfile
C. wc <infile > newfile
D. wc infile - newfile
Correct Answer: wc infile > newfile

Question: 38
Which command is used to make all files and sub-directories in the directory (progs) executable by all users?
Select one:
A. chmod -R 222 progs
B. chmod -x a+x progs
C. chmod -1 a+x progs
D. chmod -R a+x progs
Correct Answer: chmod -R a+x progs

Question: 39
To run the script, we should make it executable first by using _____
Select one:
A. chmod +w
B. chmod +r
C. chmod +x
D. chmod +rwx
Correct Answer: chmod +x

Question: 40
Select the command is used to remove the read permission of the file 'note' from both the group and others?
Select one:
A. chmod go+r note
B. chmod go-x note
C. chmod go+rw note
D. chmod go-r note
Correct Answer: chmod go-r note

No comments:

Post a Comment