1
+ # Session 0 Exercises
2
+
3
+ ## Refresher
4
+
5
+ ---
6
+
7
+ ### Bash commands:
8
+
1
9
``` bash
2
10
pwd # Prints to the console the path of your current working directory
3
11
@@ -12,7 +20,7 @@ cd .. # Gets out of the directory you are in
12
20
13
21
mkdir < directory_name> # Creates new directory
14
22
15
- rmdir my_folder # Deletes an empty Directory (Folder)
23
+ rmdir < directory_name > # Deletes an empty Directory (Folder)
16
24
17
25
rm -r < directory_name> # Deletes the directory and its contents recursively
18
26
@@ -23,10 +31,30 @@ rm <file_name.txt/file_name.py> # Deletes file
23
31
24
32
25
33
34
+ echo " Hello!" # Print the text "Hello!" in the terminal window
35
+
36
+ echo " Bonjour!" > file.txt # Writes the text "Bonjour!" in the file.txt file
37
+
38
+ cat file.txt # Reads the file.txt file -> prints the text "Bonjour!" to the console
39
+
40
+
41
+ history # Displays your recently run Bash Commands
42
+
43
+ clear # Clears the terminal screen
44
+
26
45
```
27
46
47
+ ---
48
+
49
+ ### Bash shortcuts:
50
+
51
+ - TAB - autocompletes commands, file names, or directory names for you.
52
+
53
+ - UP/DOWN Arrows - Scroll backward and forwards through previous commands you’ve typed in the current session.
54
+
55
+ ---
28
56
29
- When you are done for the day, don't forget to commit and push your work using the git commands:
57
+ ### Git commands:
30
58
31
59
``` shell
32
60
@@ -37,3 +65,31 @@ git commit -m "<Short description of what you have worked on.>" # Saves changes
37
65
git push origin main # Uploads local changes to your remote repository, on the main branch.
38
66
```
39
67
68
+ ---
69
+
70
+ ## Section A
71
+
72
+ 1 . Use ` pwd ` to check in what directory you are.
73
+
74
+ 2 . Use ` ls ` to check what files and folders are in the current directory.
75
+
76
+ 3 . Using ` cd <directory_name> ` go into the ` session_00 ` directory.
77
+
78
+ 4 . Create a new folder named ` my_first_folder ` using ` mkdir <directory_name> ` .
79
+
80
+ 5 . Delete the empty folder ` my_first_folder ` using ` rmdir <directory_name> ` .
81
+
82
+ 6 . Create a new folder named ` animals ` using ` mkdir <directory_name> ` .
83
+
84
+ 7 . Get into the ` animals ` folder by using ` cd <directory_name> ` .
85
+
86
+ 8 . Create 3 text files named ` penguin.txt ` , ` dog.txt ` , ` bee.txt ` by using ` touch <file_name.txt> ` .
87
+ - Extra challenge: Can you do this while using ` touch ` only once?
88
+
89
+ 9 . Create your first python file called ` snake.py ` by using ` touch <file_name.py> ` .
90
+
91
+ 10 . Delete the ` bee.txt ` file with the ` rm <file_name.txt> ` command.
92
+
93
+ 11 .
94
+
95
+
0 commit comments