Home
Current Affairs January 2024

What is the correct answer?

4

Which of the following command is used to print the number of lines that exist in the specified file?

A. awk 'END { print NL }'

B. awk 'END { print N }'

C. awk 'END { print NR }'

D. awk 'END { print NN }'

Correct Answer :

C. awk 'END { print NR }'


The 3rd option is correct, because -12 describes, it do not display 1st and 2nd column.

Related Questions

What is the correct answer?

4

Which of the following symbol is used to represent the group of characters?

A. /

B. \

C. +

D. -

What is the correct answer?

4

Which of the following Linux command is used to set values in environment variables?

A. setval

B. setenv

C. export

D. env

What is the correct answer?

4

Which command is used to create a new group in the Linux operating system?

A. creategroup

B. addgroup

C. groupadd

D. groupcreate

What is the correct answer?

4

Which of the following command is used to delete till the end of the line in the vi editor?

A. $

B. d$

C. d0

D. DD

What is the correct answer?

4

There are the following commands that are given below, which of them are correct locate command in the Linux operating system?
a) The locate command is also used to search a file.
b) The locate command searches the file into the database.
c) The locate command slower than find command.
d) The locate command search file in MySQL database only.
Options:

A. A and B

B. A and C

C. A, B, and C

D. A, B, C, and D

What is the correct answer?

4

There are the following statements that are given below, which of them are correct about Linux File Hierarchy System?
a) The Linux File Hierarchy System is also known as Linux Root File System.
b) It is a standard that describes the directory and file structure in the operating system.
c) In different distributions of the Linux operating system, the File Hierarchy system can be a little bit different.
d) It describes where the files are located in the operating system.
Options:

A. A and B

B. C and D

C. B, C, and D

D. A, B, C, and D

What is the correct answer?

4

What are interfaces are supported by the Linux operating system?

A. Graphical User Interface

B. Command Line Interface

C. Both of the above

D. None of the above

What is the correct answer?

4

Suppose that a text file abc.txt that contains multiple lines, then how to print all complete lines with line numbers using AWK?

A. awk '{print NS,$1}' abc.txt

B. awk '{print NR,$0}' abc.txt

C. awk '{print NR,$1}' abc.txt

D. awk '{print NS,$1}' abc.txt

What is the correct answer?

4

Which command is used to check network cable is plugged or not?

A. ifplugstatus

B. ifcableplug

C. ifcablestatus

D. isplugstatus

What is the correct answer?

4

There are the following statements that are given below, which of them are correct about the Linux File System?
a) File System is a layer in the Linux operating system, which is used to control the management of storage data.
b) It provides the arrangement of files in the disk storage.
c) It is used to manage information about files like name, size, creation, and modification time.
d) Linux File System is the software that runs only on Intel architecture.
Options:

A. A and B

B. C and D

C. A, B, and C

D. A, B, C, and D

What is the correct answer?

4

Which of the following is known as match operator in AWK?

A. =

B. !

C. ~

D. ==

What is the correct answer?

4

Which command is used to querying DNS to get mapping information about the domain name and IP address?

A. netstate

B. nslookup

C. netinfo

D. domainlookup

What is the correct answer?

4

Which of the following configuration file is used by updatedb command?

A. /etc/db.conf

B. /etc/locatedb.conf

C. /etc/updatedb.conf

D. /etc/update.conf

What is the correct answer?

4

Which of the following command is known as bang bang in the Linux operating system?

A. ##

B. ,

C. !!

D. @@

What is the correct answer?

4

Which of the following command is used to display and manipulate routing tables in the Linux operating system?

A. routepath

B. routetable

C. route

D. alterroute

What is the correct answer?

4

In Linux File System, which symbol is used before filename in case of hidden files?

A. #

B. $

C. Dot (.)

D. @

What is the correct answer?

4

There are the following statements that are given below, which of them are correct about Linux shell?
a) Linux shell is a part of Linux kernel.
b) Linux shell provides an environment to execute commands.
c) Linux shell is used to execute scripts.
d) Linux shell is used to operate GPIO pins in the kernel.
Options:

A. A and B

B. B and C

C. A, B, and C

D. A, B, C, and D

What is the correct answer?

4

Which command is used to enable/disable password for a particular user?

A. usermod

B. userenable

C. userdisable

D. change

What is the correct answer?

4

Which of the following option is used to search a file with inode number using find command?

A. -inode

B. -inum

C. -inod

D. -in

What is the correct answer?

4

Which of the following are the types of file owners in the Linux Operating System?
a) User
b) Group
c) Other
d) None of the above
Options:

A. A and B

B. C and D

C. A, B, and C

D. D

What is the correct answer?

4

Which of the following directories does not take disk space?
a) /proc
b) /dev
c) /var
d) /home
Options:

A. A and B

B. A, B, and C

C. A, B, and D

D. A, B, C, and D

What is the correct answer?

4

Which exact command is used to multiply 4 by 2 using expr in the Linux System?

A. expr 4 * 2

B. expr 4 /* 2

C. expr 4 * 2

D. expr 4 ^* 2

What is the correct answer?

4

Which of the following command is used to copy one word in vi editor?

A. c

B. w

C. cw

D. yw

What is the correct answer?

4

What is the full form of JFS?

A. Just File System

B. Journaled File System

C. Joint File System

D. Joker File System

What is the correct answer?

4

How to check the version of the ls command?

A. ls -v

B. ls --v

C. ls -version

D. ls --version

What is the correct answer?

4

Which Linux command is used to check disk usage of files and directories?

A. diskinf

B. diskuse

C. du

D. fileinf

What is the correct answer?

4

Which exact command is used to assign all read, write and execute permission to all owners of a file?

A. chmod 7

B. chmod 777

C. chown 777

D. chgrp 777

What is the correct answer?

4

Which of the following built-in variable is used that contains the name of the specified file in the AWK command?

A. NAME

B. FILENAME

C. FNAME

D. FN

What is the correct answer?

4

Which of the following command is used to undo the last command in the vi editor?

A. uu

B. x

C. X

D. u

What is the correct answer?

4

There are the following statements that are given below, which of them are correct about bang bang command in the Linux operating system?

A. The bang bang command is used to remove commands history.

B. The bang bang command is used to remove execute last executed command.

C. The bang bang command is used to display the last login time of the current user.

D. None of the above