xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

Linux shell command for moving file & folders All In One

Linux shell command for moving file & folders All In One

shell types: bash / sh / zsh / csh

mv

$ which mv

$ man mv

# mv  [-f] source target/ target folder
$ sudo mv -f mongodb-macos-x86_64-4.2.6.tgz /usr/local

demos

➜  Desktop which mv
/bin/mv
➜  Desktop man mv
➜  Desktop mv mongodb-macos-x86_64-4.2.6.tgz /usr/local
mv: rename mongodb-macos-x86_64-4.2.6.tgz to /usr/local/mongodb-macos-x86_64-4.2.6.tgz: Permission denied
➜  Desktop sudo mv -f mongodb-macos-x86_64-4.2.6.tgz /usr/local
Password:
➜  Desktop 


mongodb

cd, curl, tar

# 进入 /usr/local
$ cd /usr/local

# 下载
$ sudo curl -O https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-4.2.6.tgz

# 解压
$ sudo tar -zxvf mongodb-macos-ssl-x86_64-4.2.6.tgz

# 重命名为 mongodb 目录, mv ? rename
$ sudo mv mongodb-macos-x86_64-4.2.6/ mongodb

https://www.runoob.com/mongodb/mongodb-osx-install.html

$ ./mongo

$ > quit()

$ show dbs
$ db
$ use local

https://www.runoob.com/mongodb/mongodb-databases-documents-collections.html

demos

(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!

refs



©xgqfrms 2012-2021

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2020-04-21 23:20  xgqfrms  阅读(370)  评论(6编辑  收藏  举报