Ace your COMPTIA A+ certification with our practice exam. Engage with a variety of questions including multiple choice and performance-based, complete with hints and detailed explanations. Prepare effectively and boost your confidence for the big 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.