Alterna · учебный материал

File System — Warehouse Map

File system: Files, folders, tracks, masks (*, ?), URL, file search, information volume. Interactive lesson. OGE No. 7, No. 11, No. 12.

Что в этом материале

Содержание и основные понятия

Back to the table of contents
Alterna · Chapter 3 · page 3.2
File System — Warehouse Map
The hard drive holds trillion bytes. Without a map in this ocean, there's no reference. This map is a file system. It's the one that's most often checked in the exams: the ways and masks of the files are the OGE (Nos. 7, 11, 12) and the volume and network address is also the EGE (N10, 13). You're gonna work every topic with your hands.
You saved a photo from the sea. Where did it go? What box did the system put it in, and how would it find it in a year's time among a million other files?
Answer —
file system
:: The way OS names, stores and organizes data on the host. It converts the raw disk from billions of cells into an understandable tree of folders and files.
GEF · Basic
PLF · Infred
OGE No. 7, 11, 12 · EEG No. 10, 13
01
Files, Folders and Catalog Tree
The basics: what a file is, what a folder is, and why the entire vault is an inverted tree.
GEF
OGE No. 11
Basic concepts
File
- Name of the data area on the medium (text, photo, song, program).
Name
and
expansion
after the point that the type indicates:
report.docx
,
sea.jpg
,
game.exe
.
Catalogue (pad)
- File container and other folders. Folders are embedded in each other and form
tree
: on top
root catalogue
, and every folder has
of parents
and maybe,
Sub-sections
.
/ (indigenous)
📁 home
📁 etc
📁 user
📁 docs
📄 sea.jpg
Figure 1.
Catalog tree: root at the top, files on "leafs."
~ Lifehak for the exam
In OGE 11's assignments, you have to go from root to right file. Draw the tree on the draft: So you don't get confused about what folder you're in.
02
Ways: Absolute and relative
The path is an address of a file in a tree. The ability to read a path is tested in almost every option.
GEF
OGE No. 11: Path to File
The Absolute Way
starts from the root and clearly indicates the file from any point:
Linux/macOS:
/home/user/docs/report.txt
Windows:
C:\Users\User\report.txt
(split - reverse slash)
\
)
Relative Path
is counted from
Current
Folders:
docs/report.txt
Two dots
..
means "upgrade", one point
.
- The "current folder".
frequent trap
The path should follow strictly the existing folders from the top down. If the question offers a path that jumps or leads to a non-existent folder, it is
not permissible
Check every step of the tree.
🧭
Gather the path to the file.
Abnormal and relative task of the JEG No. 11
Interactor
On the left is a folder tree. You click on the folders and file to "pass" the route and collect the path in the address line. Switch the mode and compare how the recording changes.
Current folder:
/
Address collected:
click on the file in the tree...
⌨️
File System Master
browser terminal · tree updated in real time
Interactor
Real mini terminal.
pwd
,
ls
,
cd
,
mkdir
,
touch
,
mv
,
rm
,
tree
,
help
,
clear
On the right, the tree is rebuilt after each command.
/home/user $
The clue is:
↑
/
↓
- The story of the teams.
mkdir photos
→
cd photos
→
touch sea.jpg
→
cd ..
→
tree
.
Catalogue Tree
03
Masks: Searching files by template
The mask is a model name with a frontal symbol, and the OGE No. 12 is all about masks.
GEF
OGE No. 12
Two Main Symbols
*
(star) -
Any sequence
Any symbols, including empty symbols.
?
(question) —
Just one.
any symbol.
Examples:
*.txt
- All text files;
doc?.*
- name from "doc" + 1 symbol, extension of any;
a*b.dat
– The name begins with "a", ends with "b".
How to decide OGE No. 12
Check every name on the mask.
Part by part
: First name to point, then extension.
*
"Eats" all the symbols you want,
?
Next up is a gymnasium: inject the mask and see which files will light up.
🎯
Mask trainer
Enter template · count coincidence
Interactor
Files in the Catalogue
Mask (name stamp):
OGE No. 12 trap
Symbol
?
- this.
Just one.
A symbol, not zero or two, so the mask
photo?.jpg
That's right.
photo1.jpg
but
NOT
That's right.
photo.jpg
(no symbol between "photo" and ".jpg") and
NOT
That's right.
photo12.jpg
(two symbols).
🧮
The mask calculator
Number of files and total volume · OGE No. 12
Interactor
The OGE 12 is often asked not only to count
Number
The files are masked, but so are they.
Total
Inject the mask, the calculator will take the files and fold the bytes.
Files (name · size)
Mask:
♪ How to translate
1 KB = 1,024 bytes. To transfer the amount of bytes to kilobytes, divided by 1024.
35 KB
.
🔍
Text Search (Ctrl+F)
Find and count the entry · EEG No. 10
Interactor
Text editors can search for the word and count how many times it occurs — as in EGE No. 10. Enter the word, and see how it is lit up.
account of the register
04
Units of measurement and file size
The topic of the information coding: The file size formula is asked both by the EEG and by the EEGE.
GEF
OGE No. 1 · EEG
Stairway of units
Minimum unit —
bt
8 bits = 1
Byte
And then each step is bigger than the previous one.
1024
(this is 210) times:
Unit
How many
Bytes
1 byte
8 bits
1
1 KB
1024 bytes
2¹⁰ = 1 024
1 MB
1024 KB
2²⁰ = 1 048 576
1 GB
1024 MB
2³⁰ = 1 073 741 824
1 TB
1024 GB
2⁴⁰
Information volume formula
If encoded by one symbol
i
Bit and text contains
K
symbol, volume:
V = K × i
bt
♪ key idea
Single-byte coding (Windows-1251, ASCII)
1 symbol = 1 byte = 8 bits
. In Unicode (UTF-16) frequently
1 symbol = 2 bytes = 16 bits
Always translate everything into the same units first (usually bits or bytes) and then count.
♪ Check yourself ♪
A text of 200 characters in one byte encoded. How many bytes does it take?
200 x 1 = 200 bytes.
And the 2-byte code?
400 bytes.
Excession and Compression: Why Archivists
Data often contain
Excess
- Repeated pieces.
WinRAR
,
7-Zip
) Finds repeats and records them shorter without losing information. So the file takes less space on the disk.
The simplest compression algorithm--
RLE
(Run-Length Encoding, "coded serial length": consecutively, the same characters are replaced by a pair of "number + symbol".
AAAAABBB
(8 characters) turns into
5A3B
(4 symbols) is a double compression.
♪ key idea
Compression
No loss
(RLE, ZIP, RAR) fully restores the raw data.
Losses
(JPEG, MP3) throws out parts for smaller size, so it cannot be used for text and software.
🗜️
RLE Archivist
Squeeze the string and count the winnings of the EEG: encoding
Interactor
Enter a string of letters (try a lot of repeats!) - the RLE algorithm will squeeze it and show the compression coefficient.
When is RLE useless?
If there is no repetition in the row (e.g.
ABCDEF
), RLE will only make it worse:
1A1B1C1D1E1F
So real archives use smarter algorithms and squeeze only if it's profitable.
05
Network Address: What's the URL made of?
Files live not only on a disk but also on the Internet. Collect the correct file address from the fragments is the OGE No. 7.
GEF
OGE No. 7
The full file address on the network is
URL
It is organized strictly according to the pattern:
протокол
://
сервер
/
путь
/
файл
Protocol
- Rule of transfer:
http
,
https
,
ftp
♪ After him always ♪
://
.
The server (dominant)
- computer name online:
obr.ru
.
Path and File
- where the document is o

Structural map of textbooks