如何在Windows上获取Mongo Shell历史记录文件或所有历史记录 [英] How to get to the Mongo shell history file or all history on Windows
问题描述
这在Mac等的〜/.dbshell中.
This is in ~/.dbshell for Mac, etc.
推荐答案
在当前目录所在的目录中创建一个 .dbshell
,并且没有单个全局 .dbshell
会在基于Unix的系统下进行.
A .dbshell
gets created in whichever the current directory is and there is no single, global .dbshell
as it'd be under a unix based system.
TLDR:
出于好奇,我在Windows VM上安装了mongodb,并在安装的 bin
文件夹中运行了一些命令.我在 bin
文件夹中看到一个 .dbshell
,其中包含我使用的所有命令.然后,我进入 c:\ temp
并给出了mongo shell的完整路径,并在其中运行了一些命令.退出后,我注意到在 c:\ temp
中创建的 .dbshell
,它具有我在该文件夹中时的命令历史记录.
I installed mongodb on my Windows VM out of curiosity for an answer, and ran a few commands while in the bin
folder of the installation. I saw a .dbshell
in the bin
folder which had all the commands I used in it. Then I went to c:\temp
and gave the full path of the mongo shell, and ran a few commands there. I noticed a .dbshell
created in c:\temp
after exiting, which had the history of the commands while I was in that folder.
这篇关于如何在Windows上获取Mongo Shell历史记录文件或所有历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!