linuxlab.io
Tutorials▾
  • Linux & networking
    File system, processes, TCP/IP, BGP and OSPF
    →
  • Terraform & IaC
    HCL, state, plan/apply on a LocalStack sandbox
    →
  • Git & GitHub
    Object model, plumbing, branching, GitHub Actions
    →
All tutorials →
PricingAboutSign inCreate account
/
  • Введение
  • Уроки
  • How it works
  • Симулятор
  • База знаний
  • Собеседование
Lessons
Footer
linuxlab-TutorialsPricingAboutPrivacy & cookies
Copyright © 2026 LinuxLab. All rights reserved.
Beginner · урок 03·~12 мин
пропустить →
About

Files and text: cat, grep, find, cp/mv/rm

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.

Если уже знаком с темой, пропустить введение и сразу к терминалу.

What you'll learn

Что узнаешь

Ключевые идеи урока. Каждая разбирается на отдельном шаге с проверкой.

  • ┌stdin/stdout are simple streams that any command reads and writes
  • ├The `>` redirect creates a file; the `|` pipe connects commands directly
  • ├rm -rf is irreversible, with no trash bin: hence the habit of looking at the path twice
  • └All these tools are text tools: they read bytes, they do not understand a "file as a document"
Commands

Команды, которые встретятся

Не нужно их заучивать заранее, запомнятся по ходу. Беглый взгляд сейчас сделает урок легче.

командачто делает
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 / rmcopy / rename / delete; -r for directories
less <file>a pager for long files; q to quit, /pat to search
Knowledge base

База знаний по теме

Короткие справочные статьи. Не главы, не нужно читать перед уроком. Удобно открывать после, чтобы закрепить термин.

/kb/file-descriptors

File descriptors

/kb/inode

Inode and why a name != the file

готов?

Sandbox запустится автоматически, подожди 5–10 секунд после клика.

Начать урок →