Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After calling pushd/popd in bash, it will print off the current directory stack. Is there any way to prevent this behaviour, so that it will act 'quitely'? This sort of noise in a command is uncommon in unix tools.

share|improve this question
up vote 8 down vote accepted

I think this sort of "noise" is not uncommon, that's why you often do this:

pushd > /dev/null
share|improve this answer
You can also make a function to basically redefine the command and stick it in .bashrc such as: pushd() { builtin pushd $1 > /dev/null; } – jrod Feb 1 '10 at 2:02
@jrod: Since pushd can takes multiple arguments, you might want that as pushd() { builtin pushd "$@" > /dev/null; } and the quotes handle directory names with spaces. – Dennis Williamson Feb 1 '10 at 2:52
Good tip, but most unix tools don't print to the terminal EVERY TIME, but only if there's an error – Rory Feb 1 '10 at 10:05
I'd say its uncommon. The linux philosophy is actually to not print anything if everything went well except the output of the program or builtin if any. For example cd, ls, aso. – vidstige Jan 15 '15 at 17:54

Your Answer


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.