How to clear console in MongoDB

user1015104 picture user1015104 · Nov 11, 2012 · Viewed 29.2k times · Source

While using Mongodb console or shell sometimes my screen is cluttered with a lot of previous output which I do not need. So, is there a function to clear console in MongoDB?

Something like an analog of clear in MatLab.

I have tried clc, clear but with no success.

Answer

Salvador Dali picture Salvador Dali · Nov 11, 2012

Judging by Jira they have done it: You need to write cls in the shell.

You can also use a hotkey: CTRL + L.

In macOS: Command + K.

Check more hotkeys for the shell here.