We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Flags

As you've already seen in this course, some commands accept flags. Flags are options that you can pass to a command to change its behavior.

For example, the ls command can take a -l flag to show a "long" listing of files:

ls -l

Or the -a flag to show "all" files, including hidden files:

ls -a

You can also combine flags:

ls -al

Conventions

Whether or not a command takes flags, and what those flags are, is up to the developer of the command. That said, there are some common conventions:

  • Single-character flags are prefixed with a single dash (e.g. -a)
  • Multi-character flags are prefixed with two dashes (e.g. --help)
  • Sometimes the same flag can be used with a single dash or two dashes (e.g. -h or --help)

Assignment

You've found that some files have been tampered with! To figure out which one it is, you need to know the number of bytes in each file.

Use the "word count" command, wc, with the -c flag (think "byte count") to count the number of bytes in the worldbanc/public/pr_ideas.txt file.

Submit the shell checks.