MongoDB delete document


class:MongoDB views:84

MongoDb backup database

mongodump -h --port 27017 -u root -p root --authenticationDatabase admin -d company -c company -o C:\Users\cmdhelp\Desktop\test

class:MongoDb views:89

MongoDb delete index


class:MongoDb views:66

MongoDB batch modify values

db.getCollection('rule').update({"key":".$"},{$set:{"key":"\\\\.$"}},false, true)

class:MongoDB views:135

MongoDB creates unique index


class:MongoDb views:72

MongoDB adds default values in batches

db.neeq2006.update({}, {$set:{"name":""}}, false, true)

class:MongoDB views:94

export local mongodb to csv(excel)

mongoexport -h localhost --port 27017 -d cmdhelp -c cmdhelp --type=csv -f _id,name,uscc,state -o C:\Users\cmdhelp\Desktop\cmdhelp.csv

class:MongoDb views:63

MongoDb specified field increment or decrement


class:MongoDb views:100

MongoDB deletes a field in the table

db.cninfo2006.update({"fieldname":{$exists: true} },{$unset:{"fieldname":1}},false,true);

class:MongoDB views:110

MongoDB modify a field name in the table

db.neeq2006.update({}, {$rename : {"FTP_URL" : "PDF_URL"}}, false, true)

class:MongoDB views:57

MongoDB queries data for a field that is not empty


class:MongoDB views:105

MongoDB queries the documents in the collection, using conditional expressions (<, <=, >, >=,!=)

db.collection.find({field:{$gt:value}}); db.collection.find({field:{$lt:value}}); db.collection.find({field:{$gte:value}}); db.collection.find({field:{$lte:value}}); db.collection.find({field:{$ne:value}});

class:MongoDB views:102

Linux move files or folders

mv -f -v test

class:Linux views:115

Linux delete empty directories

rmdir -pv /root/newdir2/newdir3

class:Linux views:109

Linux searches for files ending in'.d'

find /lib/dracut/ -name \*.d

class:Linux views:114

Mysql delete database and delete table

drop database db_name; drop table table_name;

class:Mysql views:102

Mysql data table rename

alter table tb rename tb1;

class:Mysql views:112

Linux switch directory

cd /home

class:Linux views:110

This platform is gradually under construction, more development orders are gradually included, any questions or Suggestions can be Contact Us