Bird
0
0

Which of the following is the correct syntax to make a script named run.sh executable?

easy📝 Syntax Q12 of 15
Bash Scripting - Basics
Which of the following is the correct syntax to make a script named run.sh executable?
Achmod x run.sh
Bchmod x+ run.sh
Cchmod -x run.sh
Dchmod +x run.sh
Step-by-Step Solution
Solution:
  1. Step 1: Recall the correct order of options in chmod

    The correct syntax to add execute permission is chmod +x filename.
  2. Step 2: Check each option

    chmod +x run.sh matches the correct syntax exactly; others have incorrect order or missing symbols.
  3. Final Answer:

    chmod +x run.sh -> Option D
  4. Quick Check:

    Correct syntax is chmod +x filename [OK]
Quick Trick: Use chmod +x filename to add execute permission [OK]
Common Mistakes:
MISTAKES
  • Placing + and x in wrong order
  • Using -x which removes execute permission
  • Omitting the + sign

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Bash Scripting Quizzes