Top 150+ Solved Linux Programming MCQ Questions Answer

From 91 to 105 of 196

Q. Write the command to display the current date in the form dd/mm/yyyy.

a. date +%d/%m/%Y

b. date +”%d/%m/%Y”

c. date +/%d/%m/20%y

d. date +”/%d/%m/20%y”

  • a. date +%d/%m/%Y

Q. Which one shows the name of the operating system?

a. uname -n

b. uname -r

c. uname -o

d. uname –m

  • c. uname -o

Q. 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

  • c. tar -rvf file1 example.tar

Q. How to execute ls command inside a vi editor?

a. !ls

b. :ls

c. :!ls

d. we can’t execute

  • c. :!ls

Q. 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

  • a. vi +num file1

Q. 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

  • c. Modify/print selective contents of a file

Q. Which screen manipulation command sets the screen back to normal?

a. tput cup

b. tput smso

c. tput rmso

d. tput blink

  • c. tput rmso

Q. Which command will you use to see the available routes?

a. show route

b. route status

c. netstat -r

d. none of the mentioned

  • c. netstat -r

Q. The permission -rwxr-xr-t represented in octal expression will be

a. 0777

b. 1755

c. 1754

d. 2754

  • b. 1755

Q. With a umask value of 112, what is the default permission assigned to newly created regular file?

a. —x–x-wx

b. -rw-rw-r–

c. -r-xr-x-r–

d. -rw-rw-r–

  • d. -rw-rw-r–

Q. Which command is used to assign read-write permission to the owner?

a. chmod a+r file

b. chmod o+r file

c. chmod u=rw file

d. chmod og-r file

  • c. chmod u=rw file

Q. Given the command $ chmod o-w datafile

a. sets write permission to everyone for datafile

b. sets write permission to others for datafile

c. clears write permission to everyone for datafile

d. clears write permission to others for datafile

  • d. clears write permission to others for datafile
Subscribe Now

Get All Updates & News