CMD Master
Back to Blog
Arnošt Havelka

Practice: File Organization

Practice organizing files using mkdir and mv commands.

Start Interactive Lesson
Practice: File Organization

Time to use your new skills! Organize a messy directory by creating folders and moving files into them.

The Scenario

Your Downloads folder is a mess. Files are scattered everywhere. Let's organize them by type.

Try the command

First: Create folders for Documents, Images, and Archives!

Build the command
mkdirDocumentsImagesArchives
Terminal
C:\Users\User>mkdir Documents Images Archives

Step 1: Create Folders

Create three new directories to organize your files.

Command Prompt
/home/user/Downloads report.pdf photo.jpg backup.zip letter.txt
C:\Users\User>pwd ls

Step 2: Organize Files

Now move each file into its appropriate folder.

Try the command

Move files to their categories!

Build the command
mvfile.txtDocuments/
Choose a command
Terminal
C:\Users\User>mv report.pdf Documents/

Organize systematically:

Command Prompt
Archives Documents Images letter.txt photo.jpg report.pdf backup.zip
C:\Users\User>ls

Verify Your Organization

Check inside each folder to confirm everything is in place.

Command Prompt
C:\Users\User>ls Documents/ ls Images/ ls Archives/

Key Takeaways

  • Create organizational structure with mkdir
  • Use mv to relocate files by type
  • Organize proactively to save time finding things
  • The same pattern works for any project

Knowledge Check

1 / 3

What's the first step in organizing a messy directory?

References

These documentation links provide authoritative details for the commands used in this article.

Up Next

Save command output to a file

Overwrite with >, append with >>, then check the file with cat.