2

Some binaries in Unix-Linux systems like ping or mount have a long argument. For example if we write ping -h in the terminal, one of the options is:

Usage: ping [-aAbBdDfhLnOqrRUvV64]

Is this long set of characters really an argument?

4
  • "This is quite nicely explained in man man: ... [-abc] any or all arguments within [ ] are optional." Commented Jul 1, 2018 at 22:47
  • See stackoverflow.com/questions/36495669/… Commented Jul 1, 2018 at 23:59
  • That duplicate doesn't even answer the question of what -abc means here. The brackets make things optional, but there's still a difference between a literal string, a concatenation of multiple optional switches, and a string that's actually a description of some value. Commented Jul 2, 2018 at 5:26
  • No, it is a list of possible arguments! However, it is only an abbreviated list, the details are in man ping! Commented Jul 2, 2018 at 8:29

1 Answer 1

12

No, this is an abbreviated way of listing all the possible single-letter options: -a, -A, -b, etc. See the ping manpage for details (for better results, run man ping on your own system — that will show the documentation for the version you have installed).

1
  • Note that getopt-based programs usually can take arguments that way, although some may be mutually exclusive, such as -4 and -6 in this case. Commented Jul 2, 2018 at 1:37

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.