Skip to content

Commit df3001b

Browse files
Initial commit
0 parents  commit df3001b

File tree

6 files changed

+161
-0
lines changed

6 files changed

+161
-0
lines changed

.github/workflows/autograde.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Autograding Navigation Assignment
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
permissions:
9+
checks: write
10+
actions: read
11+
contents: read
12+
13+
jobs:
14+
run-navigation-tests:
15+
runs-on: ubuntu-latest
16+
if: github.actor != 'github-classroom[bot]' # Prevents bot-triggered runs
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Make test script executable
22+
run: chmod +x test_navigation.sh
23+
24+
- name: Run Navigation Test Script
25+
run: bash test_navigation.sh
26+
27+
- name: Autograding Reporter
28+
uses: classroom-resources/autograding-grading-reporter@v1
29+
with:
30+
runners: terminal-navigation-test

.github/workflows/classroom.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Autograding Terminal Navigation Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
repository_dispatch:
8+
9+
permissions:
10+
checks: write
11+
actions: read
12+
contents: read
13+
14+
jobs:
15+
run-autograding-tests:
16+
runs-on: ubuntu-latest
17+
if: github.actor != 'github-classroom[bot]' # Prevents bot-triggered runs
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Make test script executable
23+
run: chmod +x test_navigation.sh
24+
25+
- name: Run Navigation Test Script
26+
run: bash test_navigation.sh # Executes the student’s test script
27+
28+
- name: Autograding Reporter
29+
uses: classroom-resources/autograding-grading-reporter@v1
30+
with:
31+
runners: terminal-navigation-test

README.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Terminal Navigation Assignment
2+
3+
## Objective
4+
This assignment will help you practice **essential terminal navigation commands** used in Linux/macOS.
5+
6+
By the end of this assignment, you should be able to:
7+
- Navigate directories using the terminal.
8+
- Use commands like `pwd`, `ls`, `cd`, `find`, `cat`, and `grep`.
9+
- Locate and read files using command-line tools.
10+
11+
---
12+
13+
## Assignment Instructions
14+
15+
### Step 1: Set Up Your Environment
16+
1. Open the **GitHub Codespace** or **your terminal** if working locally.
17+
2. Verify that your working directory contains the following structure:
18+
19+
```
20+
/terminal-navigation-assignment
21+
│── practice-directory/
22+
│ ├── folder1/
23+
│ │ ├── fileA.txt
24+
│ ├── folder2/
25+
│ │ ├── fileB.txt
26+
│ ├── fileC.txt
27+
```
28+
29+
---
30+
31+
### Step 2: Complete the Following Tasks
32+
Use terminal commands to complete each task below.
33+
34+
1. **Print your current working directory (absolute path).**
35+
```sh
36+
pwd
37+
```
38+
39+
2. **List all files and directories inside practice-directory.**
40+
```sh
41+
ls practice-directory
42+
```
43+
44+
3. **Change into folder1 and verify you are inside it.**
45+
```sh
46+
cd practice-directory/folder1
47+
pwd
48+
```
49+
50+
4. **Display the contents of fileA.txt.**
51+
```sh
52+
cat fileA.txt
53+
```
54+
55+
5. **Return to the terminal-navigation-assignment root directory in a single command.**
56+
```sh
57+
cd ../../
58+
```
59+
60+
6. **Find all .txt files inside practice-directory.**
61+
```sh
62+
find practice-directory -name "*.txt"
63+
```
64+
65+
7. **Search for the word "Navigation" inside fileC.txt.**
66+
```sh
67+
grep "Navigation" practice-directory/fileC.txt
68+
```
69+
70+
---
71+
72+
### Step 3: Submit Your Work
73+
1. Run the test script to verify your work:
74+
```sh
75+
bash test_navigation.sh
76+
```
77+
78+
2. If all tests pass, commit and push your work:
79+
```sh
80+
git add .
81+
git commit -m "Completed Terminal Navigation Assignment"
82+
git push
83+
```
84+
85+
3. Your work will be automatically graded using GitHub Actions.
86+
87+
---
88+
89+
## Evaluation Criteria
90+
91+
Your assignment will be automatically graded based on:
92+
✅ Correct execution of each command.
93+
✅ Accurate directory navigation.
94+
✅ Successful file searching and reading.
95+
✅ Passing all tests in test_navigation.sh.
96+
97+
Good luck and happy navigating! 🚀

practice-directory/fileC.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Navigation is an important skill

practice-directory/folder1/fileA.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is file A in folder1

practice-directory/folder2/fileB.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is file B in folder2

0 commit comments

Comments
 (0)