The question in your assignment asks you to use the "word count option" of wc
. To find out what option this is, you need to read the wc
manual. You do this with man wc
in a terminal.
Once you have found what option is needed to only get the word count (and no other count), you need to run the command on the file /course/linuxgym/gutenberg/0ws0310.txt
while at the same time redirecting the output to a file called count.txt
. You do this with
wc (insert word count option here) /course/linuxgym/gutenberg/0ws0310.txt >count.txt
If you want to make sure that the output file is located in your home directory, use ~/count.txt
in the redirection in place of count.txt
, or just give the command cd
first to make your home directory your current directory.
There is no need to touch
the count.txt
file first as redirecting to it will create it if it does not already exist.