Skip to content
This repository was archived by the owner on Aug 17, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions MyDocuments/Quiz/QUIZ.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ 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
- [] You have access to many more commands and scripts on the Terminal than with 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 ..
Expand All @@ -20,21 +20,21 @@ You can mark your choice by putting an `x` in the correct box

- [ ] cd ..
- [ ] cd ~
- [ ] mv ..
- [x] mv ..
- [ ] cd ./

**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
- [ ] The delete key

**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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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?**
Expand All @@ -75,13 +75,13 @@ 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
Expand All @@ -92,4 +92,4 @@ You can mark your choice by putting an `x` in the correct box
- [ ] extra
- [ ] function
- [ ] dash
- [ ] all
- [x] all

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a tricky question - I am not sure your answer is correct here, you might want to check it again. I believe the question is asking for a description of that part of the command in this case.

2 changes: 1 addition & 1 deletion MyDocuments/Scripts/count_to_100.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## sleep in bash for loop ##
for i in {1..100}
for i in {1..10}
do
if [ $i -lt 11 ]
then
Expand Down
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@ Hint: You should use `cd` and `ls`.
#### 1) Answer

<!-- Write your answer here -->
`Mac@192 Terminal-Coursework-Week1 % pwd
/Users/Mac/Documents/CYF/Terminal-Coursework-Week1
Mac@192 Terminal-Coursework-Week1 % ls
GRADING.md HOW-TO-SUBMIT.md README.md
HOW-TO-GET-HELP.md MyDocuments
Mac@192 Terminal-Coursework-Week1 % cd myDocuments
Mac@192 myDocuments % ls
Photos Projects Quiz Scripts
Mac@192 myDocuments % cd projects
Mac@192 projects % ls
JavaScript-Core1 MyFirstWebsite PortfolioWebsite
Mac@192 projects % cd JavaScript-Core1
Mac@192 JavaScript-Core1 % ls
script.js
Mac@192 JavaScript-Core1 % `

### 2) Find my Hotel Photo

Expand All @@ -29,6 +44,12 @@ Next, I want to try and find the photo of my hotel from my holiday in July that
#### 2) Answer

<!-- Write your answer here -->
Mac@192 Terminal-Coursework-Week1 % cd MyDocuments
Mac@192 MyDocuments % cd photo
cd: no such file or directory: photo
Mac@192 MyDocuments % cd Photos
Mac@192 Photos % ls
HolidayJuly HolidayJune

### 3) Counting Script

Expand All @@ -53,6 +74,28 @@ For this task, I want you to **stop** the counter when I have counted to 10.
Copy the output of the script here

<!-- Write your answer here -->
Mac@192 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
Mac@192 Scripts %

### 4) Quiz

Expand Down