Creating and removing
Trang này cần trình duyệt gần đây (hỗ trợ SharedArrayBuffer). Vui lòng cập nhật Chrome, Edge, Firefox hoặc Safari lên phiên bản mới nhất.
English
Making things
mkdirmakes a directory;touchmakes an empty file:
mkdir notes
touch notes/todo.txt
- After these, you have a
notesfolder with an emptytodo.txtinside it.

English
Copying and moving
cpcopies a file;mvmoves (or renames) it. Each ▶ starts from the lesson's files, so this one first makes thenotesfolder to move into:
mkdir notes
cp hello.txt backup.txt
mv backup.txt notes/backup.txt
ls notes
mv old newis also how you rename something — moving it to a new name.
English
Removing — carefully
rmremoves a file. To remove a folder and everything in it, add-r(recursive):
cp hello.txt backup.txt
rm backup.txt
ls
mkdir notes
touch notes/todo.txt
rm -r notes
ls
- ⚠️ There is no recycle bin on the command line.
rmis permanent — always check before you delete.
English
Common mistakes
rmdeletes for good — there is no recycle bin.rm noteson a folder fails: a folder needsrm -r. (Real terminals also havermdir, which removes only an empty folder; this practice terminal does not.)
Khám phá
Folders and files
mkdir / touch add to the tree; cd moves where you are.
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
Make a new folder called notes with mkdir notes. The check then lists the folder to confirm it appeared.
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
Make a copy of hello.txt named backup.txt using cp.
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
Tidy up: create an empty file todo.txt with touch, then remove hello.txt with rm. The check lists the folder afterwards.