4

Most programs use -v to enable verbose mode. Why does the GNU xargs use -t to enable verbosity?

6

And the shell uses -x (this is short for "execution trace").

For xargs, the -t option enables "trace mode", i.e. it will show you what it's doing by printing the commands that it is executing. Tracing is just another ways of "being verbose". Note that tracing the execution of commands is a particular way of being verbose, as verbosity in other commands (such as GNU mv) doesn't really show the commands being executed but just tells you that it's doing something.

You will also notice that the GNU xargs utility has a --verbose option, which is a synonym for -t.

  • 1
    The shell also has -v for "verbose", though it's perhaps not as useful for debugging as -x is. – ilkkachu Jul 21 at 8:18
  • @ilkkachu Ah yes, I forgot about that (since I never use it). It will just make the shell output whatever it's reading as input (i.e. the source of the current script). – Kusalananda Jul 21 at 8:24
  • @K, yeah, I didn't even remember how hilariously useless it is. – ilkkachu Jul 21 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.