DELAPARRA
Index
Color
NL
Category: CLI flags

-c, --count, --config (Count / Config)

Explained by Updated

What is -c, --count, --config (Count / Config)?

-c, --count, --config (Count / Config): Another flag whose meaning shifts by tool — often "count the matches" or "use this config file". -c is one of those short flags that means something different in almost every tool. In grep -c it counts matching lines instead of printing them. In git -c it sets a configuration value for one command. In many other tools it points to a configuration file, as in nginx -c /etc/nginx/custom.conf.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about -c, --count, --config (Count / Config)

How is -c, --count, --config (Count / Config) used in practice?

Short flags are cheap to type, so tool authors reuse the same letters for unrelated things. That is fine at a terminal where you can read the help text. It is a risk in scripts, where nobody looks closely.

What should you keep in mind with -c, --count, --config (Count / Config)?

In a script, use the long form when there is one. --count and --config explain themselves to the next person who reads the file, and they protect you if a future version of the tool changes what -c means.

At a glance

CategoryCLI flags
Explained by
Updated

More CLI flags terms

All terms starting with a number or symbol

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.