Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn MongoDB 4.x

You're reading from   Learn MongoDB 4.x A guide to understanding MongoDB development and administration for NoSQL developers

Arrow left icon
Product type Paperback
Published in Sep 2020
Publisher Packt
ISBN-13 9781789619386
Length 610 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Doug Bierer Doug Bierer
Author Profile Icon Doug Bierer
Doug Bierer
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

Preface 1. Section 1: Essentials
2. Introducing MongoDB 4.x FREE CHAPTER 3. Setting Up MongoDB 4.x 4. Essential MongoDB Administration Techniques 5. Section 2: Building a Database-Driven Web Application
6. Fundamentals of Database Design 7. Mission-Critical MongoDB Database Tasks 8. Using AJAX and REST to Build a Database-Driven Website 9. Section 3: Digging Deeper
10. Advanced MongoDB Database Design 11. Using Documents with Embedded Lists and Objects 12. Handling Complex Queries in MongoDB 13. Section 4: Replication, Sharding, and Security in a Financial Environment
14. Working with Complex Documents Across Collections 15. Administering MongoDB Security 16. Developing in a Secured Environment 17. Deploying a Replica Set 18. Replica Set Runtime Management and Development 19. Deploying a Sharded Cluster 20. Sharded Cluster Management and Development 21. Other Books You May Enjoy

Command-line usage examples

In this example, we copy a number of large files drawn from the open source GeoNames project representing world city data and postal codes. The data provided by the project, authored by Marc Wick, is licensed under a Creative Commons Attributions v4.0 license. In the book repository, there is a script, /path/to/repo/sample_data/geonames_downloads.sh, that imports and unzips two large GeoNames project sample data files. Here is that download script:

#!/bin/bash
export STATS_URL="https://download.geonames.org/export/dump/allCountries.zip"
export ZIP_URL="https://download.geonames.org/export/zip/allCountries.zip"
wget -O /tmp/stats.zip $STATS_URL
wget -O /tmp/postcodes.zip $ZIP_URL
unzip /tmp/stats.zip -d /tmp
mv /tmp/allCountries.txt /tmp/allCountriesStats.txt
unzip /tmp/postcodes.zip -d /tmp
mv /tmp/allCountries.txt /tmp/allCountriesPostcodes.txt
rm /tmp/*.zip
ls -l /tmp/all*

Here is a list of the files to be copied into GridFS:

As you can see, most...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image