101-500 Exam Questions

Total 242 Questions

Last Updated Exam : 16-Dec-2024

Topic 3, GNU and Unix Commands

Which of the following commands determines the type of a file by using a definition
database file which contains information about all common file types?


A.

magic


B.

type


C.

file


D.

pmagic


E.

hash





C.
  

file



Which of the following commands prints all files and directories within the /tmp directory or
its subdirectories which are also owned by the user root? (Choose TWO correct answers.)


A.

find /tmp -uid root -print


B.

find -path /tmp -uid root


C.

find /tmp -user root -print


D.

find /tmp -user root


E.

find -path /tmp -user root –print





C.
  

find /tmp -user root -print



D.
  

find /tmp -user root



Which command is used in a Linux environment to create a new directory? (Specify ONLY the command without any path or parameters.)






Answer: mkdir, /usr/bin/mkdir

In the vi editor, which of the following commands will copy the current line into the vi buffer?


A.

c


B.

cc


C.

1c


D.

yy


E.

1y





D.
  

yy



While editing a file in vi, the file changes due to another process. Without exiting vi, how can the file be reopened for editing with the new content?


A.

:r


B.

:n


C.

:w


D.

:e





D.
  

:e



What command will generate a list of user names from /etc/passwd along with their login shell?


A.

column -s : 1,7 /etc/passwd


B.

chop -c 1,7 /etc/passwd


C.

colrm 1,7 /etc/passwd


D.

cut -d: -f1,7 /etc/passwd





D.
  

cut -d: -f1,7 /etc/passwd



Which of the following commands moves and resumes in the background the last stopped shell job?


A.

run


B.

bg


C.

fg


D.

back





B.
  

bg



Which of the following commands is used to change options and positional parameters for a running Bash?


A.

history


B.

set


C.

bashconf


D.

setsh


E.

envsetup





B.
  

set



What is the output of the following command?
echo "Hello World" | tr -d aieou


A.

Hello World


B.

eoo


C.

Hll Wrld


D.

eoo Hll Wrld





C.
  

Hll Wrld



Which of the following command sets the Bash variable named TEST with the content
FOO?


A.

set TEST="FOO"


B.

TEST = "FOO"


C.

var TEST="FOO"


D.

TEST="FOO"





D.
  

TEST="FOO"




Page 8 out of 25 Pages
Previous