CompTIA A+ Core 2 (220-1002) — Question 426
A user is trying to find a file that contains a specific string on a Linux workstation. The user locates the file and then needs to navigate to another directory to work with it. Which of the following commands should the user enter to accomplish both of these tasks? (Choose two.)
Answer options
- A. grep
- B. chmod
- C. rm
- D. pwd
- E. sudo
- F. cd
Correct answer: A, F
Explanation
The command 'grep' is used to search for specific strings within files, making it essential for finding the desired file. The command 'cd' is necessary for changing directories, allowing the user to navigate to the location where they want to work. The other options do not fulfill both tasks effectively.