Home
Current Affairs January 2024

What is the correct answer?

4

How to print non-empty line from the given file using AWK?

A. awk 'NF > 0'

B. awk 'NF'

C. awk 'NE > 0'

D. awk 'NE'

Correct Answer :

A. awk 'NF > 0'


The 1st command is used to print non-empty line. Because the NF variable denotes number of fields in the file.

Related Questions

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

Which of the following Linux distribution does not follow the File Hierarchy System?
a) Ubuntu
b) GoboLinux
c) NixOS
d) Redhat
Options:

A. A and B

B. A and C

C. B and C

D. B and D

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 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 command is used to repeat the last command in the vi editor?

A. Dot (.)

B. !

C. @

D. $

What is the correct answer?

4

There are the following statements that are given below which of them are correct about the ss command in the Linux operating system?
a) The ss command is the replacement for the netstat command.
b) It is faster than the netstat command.
c) We can display all UDP and TCP socket connections using ss command.
d) The ss can display all TCP socket connections only.
Options:

A. A and B

B. A and C

C. A, B, and C

D. A, B, and D

What is the correct answer?

4

Which of the following information can be displayed using the netstat command?
a) Information about programs related to open socket.
b) Information about routing tables.
c) Statistics about all ports
d) All of the above
Options:

A. A and B

B. B and C

C. A and C

D. D

What is the correct answer?

4

Which command is used to view the specified lines from the start of a file?

A. start

B. head

C. beg

D. first

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

dig stands for?

A. Domain Information Groper

B. Domain Instruction Gist

C. Double Instruction Groper

D. Double Information Groper

What is the correct answer?

4

Which of the following characters are used for wildcards in the Linux operating system?
a) ?
b) *
c) []
d) <> 
Options:

A. A and B

B. A and C

C. A, B, and C

D. D

What is the correct answer?

4

There are the following statements that are given which of them are correct about Linux commands?
a) In the Linux operating system, a command is an instruction to the system to perform a particular task.
b) Linux commands are case sensitive.
c) All Linux commands are scripts written in python.
d) All of the above
Options:

A. A and B

B. A and C

C. B and C

D. D

What is the correct answer?

4

Which of the following commands are external commands in the Linux operating system?
a) cat
b) file
c) help
d) man
Options:

A. A and B

B. C and D

C. A, B, and D

D. A, B, C, and D

What is the correct answer?

4

Which command is used to check the type of file?

A. type

B. file

C. filetype

D. filetypes

What is the correct answer?

4

Which command is used to know information about a password?

A. change

B. knowpass

C. passinf

D. info

What is the correct answer?

4

Which of the following operator is used to store the exit code of a previous command?

A. $?

B. %$

C. ?&

D. ?@

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

There are the following statements that are given below, which of them are correct about root directory in Linux?
a) All directories have come inside the root directory in the Linux operating system.
b) The root directory is represented by a forward slash (/).
c) The root directory is represented by a backward slash (/).
d) The root directory is the part of Linux Kernel
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

Which of the following command is used to start typing at the end of the current line in the vi editor?

A. A

B. a

C. o

D. O

What is the correct answer?

4

There are the following options that are given below, which of them are correct signals used in the Linux?
a) SIGINT
b) SIGHUP
c) SIGQUIT
d) SIGKILL
Options:

A. A and B

B. A, B, and C

C. A, C, and D

D. A, B, C, and D

What is the correct answer?

4

Which exact command is used to list the files and directories with the size of the file or directory?

A. ls -l

B. ls -s

C. ls -k

D. ls -h

What is the correct answer?

4

Which of the following symbol is used to match the empty string at the edge of a word?

A. \

B. >

C. B

D. 

What is the correct answer?

4

Which of the following command is used to display the calendar?

A. cal

B. calendar

C. calen

D. cln

What is the correct answer?

4

The grep stands for?

A. Global Regular Expression Print

B. General Regular Expression Pegging

C. General Regular Expression Post

D. Global Regular Expression Post

What is the correct answer?

4

The /opt directory comes in which category of directories?

A. Binary directories

B. Data directories

C. Variable directories

D. Memory directories

What is the correct answer?

4

Which of the following keyword is used to specify the time of 4pm in at command for scheduling tasks?

A. breaktime

B. freetime

C. midnight

D. teatime

What is the correct answer?

4

Which of the following are correct types of shells used in the Linux operating system?
a) Bourne shell
b) Korn shell
c) Bourne Again shell
d) POSIX shell
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 of the following modes are used to assign permission to the file in the Linux operating system?

A. Numeric mode

B. Symbolic mode

C. Both

D. None

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 swap two lines in the vi editor?

A. sl

B. SL

C. DDP

D. ddp