The ~/notes/ directory is already filled with three files of different
types. In this lesson you learn to read them in different ways, search for
lines, copy and rename.
All these files sit under your home directory, part of the standard hierarchy fhs, and the read/write permissions are managed through file-permissions.
Если уже знаком с темой, пропустить введение и сразу к терминалу.
Ключевые идеи урока. Каждая разбирается на отдельном шаге с проверкой.
Не нужно их заучивать заранее, запомнятся по ходу. Беглый взгляд сейчас сделает урок легче.
| команда | что делает |
|---|---|
head -n N <file> | the first N lines (tail for the last) |
tail -f <file> | follow a file as it grows in real time |
grep <pattern> <file> | lines that match; -i makes the regex case-insensitive |
grep -c <pattern> <file> | the match count only |
cp / mv / rm | copy / rename / delete; -r for directories |
less <file> | a pager for long files; q to quit, /pat to search |
Короткие справочные статьи. Не главы, не нужно читать перед уроком. Удобно открывать после, чтобы закрепить термин.
готов?
Sandbox запустится автоматически, подожди 5–10 секунд после клика.