010-160 Exam QuestionsBrowse all questions from this exam

010-160 Exam - Question 23


Which of the following commands will search for the file foo.txt under the directory /home?

Show Answer
Correct Answer: D

To search for a specific file within a directory in Unix-like operating systems, the 'find' command is used with the '-name' option followed by the filename. The command 'find /home -name foo.txt' correctly specifies the directory and the filename to search for. The other options either use incorrect syntax or invalid options.

Discussion

8 comments
Sign in to comment
WaldoWhereAmIOption: D
Feb 26, 2020

Should be: find /home —name foo.txt the "" should be — (single dash)

STFN2019
Jul 22, 2021

In fact if you're on the home dir then all you need is: find -name foo.txt

sasquatchshrimpOption: D
Dec 13, 2020

This is correct, I verified it on centos. Proper syntax is "find /home -name foo.txt"

ahenriquez02Option: D
Dec 22, 2022

D find /home/ - name foo.txt

emartin1967Option: D
Sep 11, 2020

I tried it without quotes or dashes, and it worked.

linvidiaOption: D
Oct 27, 2022

The syntax is: find /home -name foo.txt

mason64
Nov 3, 2020

that command didnt work for me.

RouterOption: D
Nov 10, 2022

the command should be find /home search foo.txt

VovanichOption: D
Dec 20, 2022

D. find /home ג€"name foo.txt