3

So I am creating some Vagrant provisioning scripts for some Ubuntu (14.04) boxes. I am using commands like this to install Ubuntu packages via Aptitude:

sudo aptitude install -y -q=2

Okay, I understand that -q and -q=1 are functionally the same and that -q=2 suppresses even more output.

But are there other values connected to -q? For example is there a -q=3, -q=4 or even a -q=5 value that can be set? And does it make any difference in the great scheme of things? Or does Aptitude only operate on a “greater than or equal to” basis and -q=2 is the top limit?

1 Answer 1

0

I believe this says it all man aptitude:

   -q[=<n>], --quiet[=<n>]
       Suppress all incremental progress indicators, thus making the
       output loggable. This may be supplied multiple times to make the
       program quieter, but unlike apt-get, aptitude does not enable -y
       when -q is supplied more than once.

       The optional =<n> may be used to directly set the amount of
       quietness (for instance, to override a setting in
       /etc/apt/apt.conf); it causes the program to behave as if -q had
       been passed exactly <n> times.

Here it says setting -q to the values indicated by you will be interpreted as passing -q that number of times.

So doing -q=5 is equivalent to doing -q -q -q -q -q, but of course doing -q=5 is much pleasing and readable. The operational difference is that it makes the program run far more quietly with respect to the number of -qs used.

1
  • 1
    „More quiet“ is quite unclear, don't you think? If I don't want any output, do I have to set -q5 or -q10000, just to be sure? That's really bad documented there, and it's the same in info aptitude (where man aptitude may have stolen from, or the other way around). Btw -qqq doesn't work, I was mistaken there, it's -q=3 or -q3 or -q -q -q.
    – dessert
    Oct 12, 2017 at 20:40

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.