Prepare for the COMPTIA A+ Exam. Test your knowledge with our flashcards and multiple choice questions, complete with hints and explanations. Ensure you're ready for exam day!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


What does the Linux command 'ls /bin/p* | grep wd' do?

  1. Lists all directories starting with 'p' and containing 'wd'

  2. Lists all files starting with 'p' and containing 'wd' in the filename or path

  3. Deletes all files starting with 'p' and containing 'wd'

  4. Creates a new file starting with 'p' containing 'wd'

The correct answer is: Lists all files starting with 'p' and containing 'wd' in the filename or path

This command lists all files and directories starting with 'p' and containing 'wd' within their filename or path. Option A is incorrect as it only lists directories, while option C is incorrect as it deletes files rather than listing them. Option D is incorrect as it does not create a new file.