如何在Windows上获取Mongo Shell历史记录文件或所有历史记录 [英] How to get to the Mongo shell history file or all history on Windows

查看:102
本文介绍了如何在Windows上获取Mongo Shell历史记录文件或所有历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这在Mac等的〜/.dbshel​​l中.

This is in ~/.dbshell for Mac, etc.

推荐答案

在当前目录所在的目录中创建一个 .dbshel​​l ,并且没有单个全局 .dbshel​​l 会在基于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 文件夹中看到一个 .dbshel​​l ,其中包含我使用的所有命令.然后,我进入 c:\ temp 并给出了mongo shell的完整路径,并在其中运行了一些命令.退出后,我注意到在 c:\ temp 中创建的 .dbshel​​l ,它具有我在该文件夹中时的命令历史记录.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆