摘要: 常用shell命令如下: 1、查询本地所有数据库名称 > show dbs; 2、切换至指定数据库环境(若无指定的数据库,则创建新的库) > use dbtest; 切换至dbtest库或创建名为dbtest的库 3、查询当前库下的所有聚集集合collection(相当于table) www.2ct 阅读全文
posted @ 2020-06-12 16:24 CatherLee 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 引入例子:先判断有没有这个文件,有的话删除文件 const fs=require('fs') fs.stat('./hehe.js',(err,stats)=>{ if(err){ console.log('文件不存在') }else{ fs.unlink('./hehe.js',(err)=>{ 阅读全文
posted @ 2020-06-12 15:36 CatherLee 阅读(371) 评论(0) 推荐(0) 编辑