A user is asking the systems administrator for assistance with writing a script to verify whether a file exists. Given the following: Which of the following commands should replace the string?

QuestionsCategory: XK0-005A user is asking the systems administrator for assistance with writing a script to verify whether a file exists. Given the following: Which of the following commands should replace the string?
Admin Staff asked 6 months ago
A user is asking the systems administrator for assistance with writing a script to verify whether a file exists. Given the following:
 Image
Which of the following commands should replace the  string?

A. if [ -f "$filename" ]; then

B. if [ -d "$filename" ]; then

C. if [ -f "$filename" ] then

D. if [ -f "$filename" ]; while








 

Suggested Answer: A





This question is in XK0-005 CompTIA Linux+ Exam
For getting CompTIA Linux+ Certificate



Disclaimers:
The website is not related to, affiliated with, endorsed or authorized by CompTIA. 
Trademarks, certification & product names are used for reference only and belong to CompTIA.
The website does not contain actual questions and answers from CompTIA's Certification Exams.

Next Post

Recommended

Welcome Back!

Login to your account below

Create New Account!

Fill the forms below to register

Retrieve your password

Please enter your username or email address to reset your password.