Unix Commands  «Prev  Next»

WC Command - Exercise

Objective: Practice finding files and listing file size using the wc command.

Exercise Scoring

This exercise is auto-scored and is worth 4 points.

Download files

Find the file named clothes in your home directory.


  1. Write a command using the –l option with the wc command to display the number of lines in the clothes file.
  2. Write a command to copy the number of lines in the file called clothes into the variable line count. Use embedded command execution.
  3. Write a command to display the location of the volleyball file. Start your search in your home directory.
  4. Write a command to display all the directories owned by user bin. This time, start your search in the /etc directory.

Submitting your exercise

This exercise is auto-scored; when you complete the exercise, click the Submit button to receive full credit.