Linux & OS Internals
Reading and editing files: cat, less, tail -f, nano, vim
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.
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
- 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.
- Create, copy, move and delete files without losing dataBeginner · 5 min
Learn how copying, moving and deleting files affect existing data, and how to check a command before running it.
- 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.
- Ownership: chown, chgrp and why a directory needs the x bitBeginner · 5 min
Permissions say what each class may do. Ownership decides which class you are. Directories add a twist: the x bit means enter, and without it the file inside is…