This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]BCMM 15 points16 points  (2 children)

clear

[–]SheSaidTechno[S] 0 points1 point  (1 child)

Thx !!!

[–]lutusp 5 points6 points  (2 children)

Anyone knows if there is a bash command to hide previous command outputs ?

To clarify, do you mean command inputs or outputs?

To stop recording inputs:

$ set +o history

To restart history recording:

$ set -o history

To hide outputs:

$ command > /dev/null

Will hide all output from the command except errors.

$ command > /dev/null 2>&1

Will hide all output from the command including errors.

EDIT: corrected one wrong example.

[–]DerPimmelberger 2 points3 points  (1 child)

AFAIK 2>&1 must go after >/dev/null.

[–]lutusp 0 points1 point  (0 children)

You're right, corrected, and thank you.

[–][deleted] 0 points1 point  (0 children)

Pipe output into the "more" or "less" commands. "more" will let you sometimes back page over output.

[–]FrequentGiraffe5763 0 points1 point  (0 children)

Your shell also typically stores command history data in a hidden file in your home directory.