Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm looking for a way to make aptitude(1) be quiet when installing packages. I want it to only produce output on explicit errors. The -q option does this is most other programs, but apparently not in aptitude.

My goal is being able to say:

someprogram: You need to install the foobar package for this to work.

$ sudo aptitude install foobar -yq &

And not have the screen filled with text. I'm aware of > /dev/null, but that seems like an ugly way of doing what I feel should be a very common task.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

> /dev/null is actually the standard way of shutting up programs.

Output redirection (whether to a file or to the bit bucket) is indeed a common task, which is why the single-character > operator was introduced in Unix shells. (In its predecesor Multics, one would have to run a separate iocall attach ... command before and after, to set up and remove redirections.)

Another feature that Unix shells have for performing common tasks is scripts and functions. If you just want to shorten a command, use:

inst() { sudo aptitude install "$@" -yq > /dev/null & }

which will allow you to install stuff with inst package.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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