SK0-005 · Question #491
A server administrator is creating a script that will move files only if they were created before a date input by the user. Which of the following constructs will allow the script to apply this test…
The correct answer is B. Loop. A loop is a script construct that allows the script to repeat a block of code until a certain condition is met or for a specified number of times. A loop can be used to apply a test to each file in a directory and move the files that meet the criteria.
Question
A server administrator is creating a script that will move files only if they were created before a date input by the user. Which of the following constructs will allow the script to apply this test until all available files are assessed?
Options
- AVariable
- BLoop
- CComparator
- DConditional
How the community answered
(21 responses)- A5% (1)
- B86% (18)
- C10% (2)
Explanation
A loop is a script construct that allows the script to repeat a block of code until a certain condition is met or for a specified number of times. A loop can be used to apply a test to each file in a directory and move the files that meet the criteria.
Topics
Community Discussion
No community discussion yet for this question.