Practice: Files Challenge
Putting it all together.
You now know a lot about files and folders. Let's put it together in one challenge. Read the task, pause, and try it in your own terminal.

- You know a lot now
- One challenge
- Pause and try it
The challenge
Make a folder called archive. Copy every text file from your home folder into it. Rename the to do file inside archive to old todo dot TXT. Then show the result with LS dash L. Pause now.
A solution
Here's one way. MK dir archive. Then CP star dot TXT archive, copies both text files at once. MV renames the to do file inside the archive. And LS dash L archive shows both files, with the new name. Did yours match?
mkdir archive cp *.txt archive mv archive/todo.txt archive/old-todo.txt ls -l archive total 8 -rw-r--r-- 1 sam sam 30 Jan 5 09:00 notes.txt -rw-r--r-- 1 sam sam 58 Jan 5 09:00 old-todo.txt
What you used
In that one task, you used four commands, a wildcard, and both kinds of path. That's the core of working with files on Linux. Everything else builds on this.
| key | value |
|---|---|
| mkdir | made a folder |
| cp + *.txt | copied with a wildcard |
| mv | renamed |
| ls -l | checked the result |
Summary
You can create, copy, rename, find, and inspect files from the terminal. Next, a new section. Searching inside files, with grep.
Key takeaways- mkdir, cp, mv
- Wildcards
- ls -l to check