Make and change directories and files

A passionate full-stack developer from @ePlus.DEV
Search for a command to run...

A passionate full-stack developer from @ePlus.DEV
No comments yet. Be the first to comment.
Overview In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure out how to

🏕️ Arcade Base Camp August 2026 Welcome to Arcade Base Camp August 2026, where you’ll develop key Google Cloud skills and earn an exclusive credential that will open doors to the cloud for you. No pr

Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary Google Cloud giới thiệu hai Database Operations Agents hỗ trợ onboard

Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary SK hynix và Sandisk công bố đặc tả mở đầu tiên cho High Bandwidth Fla

Challenge overview In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure

Instructions
Step 1: Open Terminal in your VS code editor.
Step 2: Type the command mkdir lab and press Enter
Step 3: Change to the lab directory by typing cd lab and pressing Enter
Step 4: Type the command touch file1.txt and press Enter to create a file named file1.txt
Step 5: Type the command mkdir dir1 and press Enter
Step 6: Type the command mv file1.txt dir1/ and press Enter to move file1.txt to the dir1 directory
Step 7: Type the command touch file2.txt and press Enter to create a file named file2.txt
Step 8: Type the command mkdir -p dir2/dir3 and press Enter. We're using the -p flag to create the parent directories if they do not exist. In this case it will create the dir2 directory and then create the dir3 directory inside of dir2.
Step 9: Type the command mv file2.txt dir2/dir3/ and press Enter to move file2.txt to the dir3 directory
Step 10: Change to the dir2 directory by typing cd dir2
Step 11: Type the command touch file3.txt and press Enter to create a file named file3.txt
Step 12: Type the command mv file3.txt ../ and press Enter to move file3.txt to the lab directory
Step 13: Type the command cd .. and press Enter to navigate back to the lab directory
Step 14: Type the command cd dir1 and press Enter.
Step 15: Type the command ls -l and press Enter. Note how many files and directories are in the dir1 directory.
Step 16: Type the command cd ../dir2 and press Enter.
Step 17: Type the command ls -l and press Enter. Note how many files and directories are in the dir2 directory.
Step 18: Type the command cd dir3 and press Enter.
Step 19: Type the command ls -l and press Enter. Note how many files and directories are in the dir3 directory.
Here's a step-by-step guide based on your instructions:
Open Terminal in VS Code:
Open VS Code.
Open the terminal by navigating to View > Terminal or by using the shortcut Ctrl+ ` (Control + Backtick).
Create a Directory named lab:
In the terminal, type:
mkdir lab
Press Enter.
Change to the lab Directory:
Type:
cd lab
Press Enter.
Create a File named file1.txt:
Type:
touch file1.txt
Press Enter.
Create a Directory named dir1:
Type:
mkdir dir1
Press Enter.
Move file1.txt to dir1:
Type:
mv file1.txt dir1/
Press Enter.
Create a File named file2.txt:
Type:
touch file2.txt
Press Enter.
Create Nested Directories dir2 and dir3:
Type:
mkdir -p dir2/dir3
Press Enter.
Move file2.txt to dir3:
Type:
mv file2.txt dir2/dir3/
Press Enter.
Change to the dir2 Directory:
Type:
cd dir2
Press Enter.
Create a File named file3.txt:
Type:
touch file3.txt
Press Enter.
Move file3.txt to the Parent Directory (lab):
Type:
mv file3.txt ../
Press Enter.
Navigate Back to the lab Directory:
Type:
cd ..
Press Enter.
Change to the dir1 Directory:
Type:
cd dir1
Press Enter.
List Files and Directories in dir1:
Type:
ls -l
Press Enter.
Note the files and directories listed.
Change to the dir2 Directory:
Type:
cd ../dir2
Press Enter.
List Files and Directories in dir2:
Type:
ls -l
Press Enter.
Note the files and directories listed.
Change to the dir3 Directory:
Type:
cd dir3
Press Enter.
List Files and Directories in dir3:
Type:
ls -l
Press Enter.
Note the files and directories listed.
By following these steps, you will create directories and files, move them around, and list their contents to verify the changes.