Commit 69724671 authored by Christophe Trefois's avatar Christophe Trefois
Browse files

Added archive

parent 262f5283
...@@ -218,9 +218,55 @@ When you do `ls -al` you see a different view and many hidden files. ...@@ -218,9 +218,55 @@ When you do `ls -al` you see a different view and many hidden files.
ls -al ls -al
``` ```
## Start a simple program: ## Command line tools and parameters
*** ***
* Intro to command, parameters
Let's do something fun!
On our server, we will download a zip file, unzip the contents, make a small change and re-zip everything together. Ready? First, let's understand the zip command.
* Connect to the server
* Go to folder `myFirstFolder`
* Zip the two files you created
```bash
zip myArchive.zip myFile.txt file3.txt
```
* Check the contents of the zip archive
```bash
unzip -l myArchive.zip
```
Couple of notes:
* `-l` is a parameter. You can see what these parameters mean by doing `man unzip`.
* Google is your friend!
### Let us download a zip from the Internet and extract its contents
Let's go:
```bash
cd
wget http://bit.ly/anArchive -O myName.zip
ls
```
* First I check the contents to make sure it's what I wanted:
```
unzip -l myName.zip
```
* If I am satisfied, I can safely extract
```
unzip myName.zip
```
* How to zip my folder? Unzip? * How to zip my folder? Unzip?
* wget -> untar -> changes -> re-pack * wget -> untar -> changes -> re-pack
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment