Which of the following command-line utilities would you use to accomplish this task?

You work as a Network Administrator for McNeil Inc. The company has a Linux-based network.
You are a root user on the Red Hat operating system. You want to see all directories and files,
including hidden files of your home directory in long listing format. Which of the following
command-line utilities would you use to accomplish this task?

You work as a Network Administrator for McNeil Inc. The company has a Linux-based network.
You are a root user on the Red Hat operating system. You want to see all directories and files,
including hidden files of your home directory in long listing format. Which of the following
command-line utilities would you use to accomplish this task?

A.
ls -al /root

B.
ls

C.
ls -s /root

D.
ls -h /root

Explanation:

The ls -al /root command lists all the files and directories, including hidden files in the /root
directory, in long listing format. /root is the root
user’s home directory.
What is the ls command?
The ls command is used to list files on a Linux computer. The syntax of the ls command is as
follows:
ls [option] [directory name]
Several options are used with the ls command. Following is a list of some important options:

For example, the following command displays all the files (including hidden files) in the /home
directory and the contents in
the subdirectories:
ls -aR /home
Answer option B is incorrect. The ls command without arguments lists the file and directory names
in the current directory.
Answer option C is incorrect. The ls -s /root command shows the size of all files and directories (in
blocks, not bytes) that reside in the /root directory.
Answer option D is incorrect. The ls -h /root command shows the size of files and directories in
“human readable format” (i.e. 19M, 3G, etc).
Answer option C is incorrect. The pdf2ps utility is used to convert a PDF file to a PostScript.



Leave a Reply 0

Your email address will not be published. Required fields are marked *