Linux & OS Internals
Create, copy, move and delete files without losing data
Learn how copying, moving and deleting files affect existing data, and how to check a command before running it.
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A walkthrough with commands you can run
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Linux & OS Internals
- The Linux file system hierarchy: /, /etc, /var, /home, /usrBeginner · 5 min
Config, logs, programs and your own files each have a standard home. Learn the five or six that matter and you can find almost anything on an unfamiliar server.
- Paths: absolute, relative, ., .. and ~Beginner · 5 min
The same command works in one folder and fails in another. The difference is almost always how you wrote the path.
- Reading and editing files: cat, less, tail -f, nano, vimBeginner · 5 min
Most of an operator's day is reading a log or changing one line of config over SSH. Pick the right viewer, and learn how to leave an editor without losing your work.
- Inodes, hard links and symbolic linksBeginner · 5 min
A file name is not the file. Once you see that a name is only a label pointing at an inode, links, deleted files that still use space, and out-of-inodes errors all make…
- Users, groups and /etc/passwdBeginner · 5 min
The kernel does not know the word alice. It knows the number 1000. Seeing how names map to numbers explains who owns what, and why a new group takes effect only at your…
- Permissions: read, write, execute and chmodBeginner · 5 min
Ten characters at the start of ls -l decide who can read, change or run a file. Read them once properly and most Permission denied tickets answer themselves.