当前位置:网站首页>Mongodb database shell command execution
Mongodb database shell command execution
2022-07-28 18:52:00 【Water and moon are clear and bright】
Method 1 :
echo "db.testdb.find({'status':'running'}).count()"|/opt/mongodb/bin/mongod 1.0.0.9:8635/test -u 'test' -p "xxxx"
Method 2 :
/opt/mongodb/bin/mongod 1.0.0.9:8635/test -u 'test' -p "xxxx" -eval "db.testdb.find({}).count()"
Method 3 :
echo "use test" > test.js
echo "db.testdb.find({}).count()" >> test.js
/opt/mongodb/bin/mongod 1.0.0.9:8635/test -u 'test' -p "xxxx" < test.js
边栏推荐
- Ue5 gas learning notes 1.8 game special effects (gameplaycue)
- 1.2 queue
- redis优势以及数据结构相关知识
- Zero knowledge proof: zkp with DDH assumption
- EasyCVR接入设备后播放视频出现卡顿现象的原因分析及解决
- Four years later, Debian finally recaptured the "debian.community" domain name!
- 记录自己在厦门两年来的面试经历--完结篇
- LVS manual
- Is the training institution of software testing reliable
- Full analysis of warehouse building on the lake: how to build a lake warehouse integrated data platform | deepnova technology collection series open class phase IV
猜你喜欢

MYSQL入门与进阶(四)

The switching language of unity causes an error: system FormatException:String was not recognized as a valid DateTime.

Decimal to binary advanced version (can convert negative numbers and boundary values)

Win11系统svchost.exe一直在下载怎么办?

C# 之 观察者模式实例 -- 订牛奶

MYSQL入门与进阶(八)

Win11电脑摄像头打开看不见,显示黑屏如何解决?

专题讲座6 树形dp 学习心得(长期更新)

1.2 queue

Chinese enterprise service industry market in 2022
随机推荐
Is the training institution of software testing reliable
APP为什么用JSON协议与服务端交互:序列化相关知识
湖上建仓全解析:如何打造湖仓一体数据平台 | DEEPNOVA技术荟系列公开课第四期
@Autowired与@Resource区别
Is it difficult for novices to change careers through self-study software testing?
Win11系统svchost.exe一直在下载怎么办?
AI has changed thousands of industries. How can developers devote themselves to the new "sound" state of AI voice
1.1. Sparse array
Log base zap of go language series
C# 之 观察者模式实例 -- 订牛奶
Meta Q2财报:营收首次下滑,Metaverse将与苹果竞争
leetcode 二叉树类
先验、后验、似然
Ue5 gas learning notes 1.2 game Tags
NPM cannot recognize the "NPM" item as the name of a cmdlet, function, script file, or runnable program. Please check the spelling of the name. If the path is included, make sure the path is correct,
Ue5 gas learning notes 0.1 case Preview
Win11电脑摄像头打开看不见,显示黑屏如何解决?
What is the future of software testing?
专题讲座6 树形dp 学习心得(长期更新)
1.1、稀疏数组