Assignment: Matering Basic Commands
Objective: Understand and apply basic command-line commands to perform everyday tasks.
1. Understanding Your Location
a: Open your terminal or command prompt in Desktop.
b: Use a command to display your current working directory
Hint
2. Creating Directories
a: Create a new directory named CLI_Task.
b: Inside CLI_Task, create two more directories: MyDocs and Projects.
Hint
3. Navigating and Listing Contents
a: Navigate into CLI_Task.
b: List all the files and directories inside CLI_Task.
c: Now, navigate into MyDocs without leaving the current directory or typing the full path.
Hint
4. Creating and Manipulating Files
a: While still inside MyDocs, create an empty file named my_notes.txt.
b: Add the line "This is my first note." to my_notes.txt.
c: Display the contents of my_notes.txt to confirm the addition.
d: Now, append another line to my_notes.txt: "CLI commands are powerful."
e: Display the contents of my_notes.txt again to confirm the appended content.
5. Moving and Deleting
a: Move my_notes.txt from MyDocs to Projects.
b: Verify the move by listing the contents of both directories.
c: Navigate to Projects and remove my_notes.txt.
d: Confirm the removal by trying to list or display the contents of my_notes.txt.
6. Challenges (Optional)
a: Without navigating out of the Projects directory, create a file inside MyDocs named challenge.txt and add the line "I completed the challenge!".
b: List the contents of MyDocs from within the Projects directory without navigating to MyDocs.