Skip to content

Commit

Permalink
Add section on downloading ESPIn files as a zip archive
Browse files Browse the repository at this point in the history
  • Loading branch information
mdpiper committed Aug 6, 2020
1 parent 659a826 commit 60f48f9
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions lessons/shell/getting-things.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,49 @@ the existing **data-shell** directory was clobbered
when the archive was uncompressed.


## Download the ESPIn repository

The ESPIn repository lives on GitHub at

> https://github.com/csdms/espin
In the lesson on [version control](../git/index.md),
we'll learn how to work with repositories hosted on GitHub,
but for now,
we can download the repository as a zip archive
and uncompress it using the commands we learned above.

Use `wget` to download the zip archive:
```
$ wget https://github.com/csdms/espin/archive/main.zip
```

The `file` command returns a file's type.
Use it to verify that file downloaded from GitHub
is actually a zip archive:
```
$ file main.zip
main.zip: Zip archive data, at least v1.0 to extract
```

Now use `unzip` to uncompress the file:
```
$ unzip main.zip
```
This creates a new directory, **espin-main**.
View its contents:
```
$ ls espin-main/
LICENSE data lessons
README.md environment.yaml media
```

Note that this is one way of getting files from GitHub.
A better way is to use `git` to retrieve the repository contents
along with their histories.
We'll cover how to do this in the [version control](../git/index.md) lesson.


## Summary

The table below summarizes the commands described in this section.
Expand All @@ -134,6 +177,7 @@ The table below summarizes the commands described in this section.
| zip | package and compress/uncompress files
| gzip | package and compress/uncompress files
| tar | package and compress/uncompress files
| file | get file type information

___

Expand Down

0 comments on commit 60f48f9

Please sign in to comment.