Files and directories
Create, move, copy and inspect files without destroying anything.
What you will be able to do
- Use mkdir -p for nested directories.
- Use cp -r for directories.
- Use rm -i or a trash tool when unsure.
- Quote paths that contain spaces.
In plain English
Paths are either absolute (start at /) or relative (start at the current directory). Use ls -la to see hidden files and permissions. Prefer cp and mv with explicit destinations, and be careful with rm.
mkdir -p notes/archive
touch notes/lesson.txt
cp notes/lesson.txt notes/archive/lesson.txt
mv notes/archive/lesson.txt notes/archive/old-lesson.txt
ls -la notes/archiveYour turn
EasyCreate a nested folder
Create a directory structure project/src/components in one command.
BASH · starter
mkdirCheck your understanding before moving on.
Knowledge checkQuestion 1
Which option creates parent directories as needed?
Select an answer to continue
Study tools
Make it yours.
Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.
Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.