From b2bad062869930d1e90db7c4511f1c072637833e Mon Sep 17 00:00:00 2001 From: lazar-eva <103130591+lazar-eva@users.noreply.github.com> Date: Mon, 27 Feb 2023 14:01:48 +0000 Subject: [PATCH] Terminal homework done --- MyDocuments/Quiz/QUIZ.md | 22 ++++++++++----------- README.md | 41 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 11 deletions(-) diff --git a/MyDocuments/Quiz/QUIZ.md b/MyDocuments/Quiz/QUIZ.md index f9a4853..93802b5 100644 --- a/MyDocuments/Quiz/QUIZ.md +++ b/MyDocuments/Quiz/QUIZ.md @@ -7,18 +7,18 @@ You can mark your choice by putting an `x` in the correct box - [ ] The terminal is an interface that allows you to access the command line - [ ] It can be much faster to complete some tasks using a Terminal than with a GUI - [ ] You have access to many more commands and scripts on the Terminal than with a GUI -- [ ] The terminal gives you more powers/privileges to complete tasks than a GUI +- [X] The terminal gives you more powers/privileges to complete tasks than a GUI **What is the correct way to move to a directory called "Projects"?** -- [ ] cd Projects +- [X] cd Projects - [ ] mv Projects - [ ] cd ..Projects - [ ] mv .. **What is the correct way to move up a directory?** -- [ ] cd .. +- [X] cd .. - [ ] cd ~ - [ ] mv .. - [ ] cd ./ @@ -26,7 +26,7 @@ You can mark your choice by putting an `x` in the correct box **How do you stop a long running task in the terminal?** - [ ] The tab key -- [ ] ctrl+c +- [X] ctrl+c - [ ] ctrl+shift or cmd+shift - [ ] The enter key - [ ] The escape key @@ -34,7 +34,7 @@ You can mark your choice by putting an `x` in the correct box **How do you auto-complete a command that you are typing?** -- [ ] The tab key +- [X] The tab key - [ ] ctrl+c - [ ] ctrl+shift or cmd+shift - [ ] The enter key @@ -43,7 +43,7 @@ You can mark your choice by putting an `x` in the correct box **What's the correct command to view all the files in your current directory?** -- [ ] ls +- [X] ls - [ ] pwd - [ ] mv - [ ] cd @@ -53,7 +53,7 @@ You can mark your choice by putting an `x` in the correct box **What's the correct command to see the current directory you are in?** - [ ] ls -- [ ] pwd +- [X] pwd - [ ] mv - [ ] cd - [ ] clear @@ -65,7 +65,7 @@ You can mark your choice by putting an `x` in the correct box - [ ] pwd - [ ] mv - [ ] cd -- [ ] clear +- [X] clear - [ ] mkdir **What is the correct command to make a folder in the terminal?** @@ -75,20 +75,20 @@ You can mark your choice by putting an `x` in the correct box - [ ] mv - [ ] cd - [ ] clear -- [ ] mkdir +- [X] mkdir **What is the correct command to move a file in the terminal?** - [ ] ls - [ ] pwd -- [ ] mv +- [X] mv - [ ] cd - [ ] clear - [ ] mkdir **What is the correct name for the part after the - in this command "ls -all"?** -- [ ] parameter +- [X] parameter - [ ] extra - [ ] function - [ ] dash diff --git a/README.md b/README.md index 2cab9a4..8974a59 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,17 @@ Hint: You should use `cd` and `ls`. #### 1) Answer +the 'script.js' file is in MyDocuments/Projects/JavaScript-Core1 +1) cd MyDocuments +2) ls +3) cd Scripts +4) ls (no script.js file) +5) cd ../ +6) cd Projects +7) ls +8) cd JavaScript-Core1 +9) ls (script.js found) + ### 2) Find my Hotel Photo @@ -29,6 +40,13 @@ Next, I want to try and find the photo of my hotel from my holiday in July that #### 2) Answer +1) pwd +2) cd ../../ +3) cd Photos +4) ls +5) cd Hotel +6) ls +7) cyf photo found! ### 3) Counting Script @@ -54,6 +72,29 @@ Copy the output of the script here +alyona@MacBook-Air-Alena Scripts % ./count_to_100.sh +I have counted to 1 +usage: sleep seconds +I have counted to 2 +usage: sleep seconds +I have counted to 3 +usage: sleep seconds +I have counted to 4 +usage: sleep seconds +I have counted to 5 +usage: sleep seconds +I have counted to 6 +usage: sleep seconds +I have counted to 7 +usage: sleep seconds +I have counted to 8 +usage: sleep seconds +I have counted to 9 +usage: sleep seconds +I have counted to 10 +usage: sleep seconds +^C + ### 4) Quiz In this directory you'll find a quick quiz for you to complete