MongoDB delete document
                            

db.col.remove({'title':'MongoDB'})

class:MongoDB views:84

MongoDb backup database
                            

mongodump -h 192.168.1.158 --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
                            

db.cmdhelp.dropIndex("name_1")

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
                            

db.cmdhelp.ensureIndex({name:1},{unique:true})

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
                            

db.getCollection('test').update({"name":"cmdhelp"},{"$inc":{"count":NumberInt(1)}})

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
                            

db.neeq2008.find({"name":{"$ne":null}})

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.zip 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