PrepAway - Latest Free Exam Questions & Answers

Which of the following commands will you use?

You work as a Network Administrator for Tech Perfect Inc. The company has a Linux-based
network.
There are six files in a directory on your laptop. You want to find out the file types of all the files at
a time. Which of the following commands will you use?

PrepAway - Latest Free Exam Questions & Answers

A.
fsck

B.
file

C.
mount

D.
init

Explanation:

You can use the file command to display the file types of all the files in a directory at a time. In
order to accomplish the task, you will have to issue the following command:
file *
What is the file command?
The file command is used to analyze the files specified in the argument.
Syntax:
file <file name1> [<file name2>] [<file name3>] …
By providing the name of a file as an argument, the file command analyzes the file. The file
command supports multiple arguments. The asterix (*) metacharacter can also be used with the
file command.
Answer option C is incorrect. In Linux, the mount command is used to mount and display disks,
partitions, and file systems. Mounting refers to the process in which the operating system prepares
the media to be read.
Answer option A is incorrect. The File System Check (fsck) command is used to scan all disks and
partitions, and it repairs them if required. The fsck command should be run only on an unmounted
file system.
Answer option D is incorrect. The init command is used to switch a Linux computer to different run
levels.


Leave a Reply