From dbfd36f7d473126827abf98c9cb18da1c69abfd6 Mon Sep 17 00:00:00 2001 From: tactonbishop Date: Sat, 4 Jun 2022 13:30:04 +0100 Subject: [PATCH] Last Sync: 2022-06-04 13:30:04 --- Linux/Devices.md | 14 +++++++++++++- markdown-styles.css | 3 ++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Linux/Devices.md b/Linux/Devices.md index 1b1523d..b55df22 100644 --- a/Linux/Devices.md +++ b/Linux/Devices.md @@ -18,10 +18,22 @@ Some of the most important device files are: So when you see `sda` listed for example, this isn't the harddisk itself, it is a file that communicates with a driver that controls how the kernel can interact with it. This is why when you add a new piece of hardware (such as a mouse for example) you have to install drivers (typically provided by the manufacturer) so that your kernel is able to interact with it and provide it with access to the CPU. +Disks are the most frequent device that you will work with, such as during a fresh install when you first partition the harddrive. + ## `/dev/` +The following `ls` shows my main harddrive partitions: ``` brw-rw---- 1 root disk 259, 1 Jun 4 11:00 nvme0n1p1 brw-rw---- 1 root disk 259, 2 Jun 4 11:00 nvme0n1p2 brw-rw---- 1 root disk 259, 3 Jun 4 11:00 nvme0n1p3 -``` \ No newline at end of file +``` +The [mode](../Programming_Languages/Shell_Scripting/File_permissions_and_execution.md#what-the-output-means) is different from ordinary files. Each device file is prepended with `b, p, c, s` before the standard permissions. These stand, respectively, for _block, character, pipe_ and _socket_. +
+
block
+
Can be split up into discrete blocks of data facilitating quick random access from the kernel. An example of a block device file is a disk
+
character
+
The data is not in discrete chunks, it is a continuous stream of characters. And example of a stream device file is a printer
+
+ +TODO: Add details on pipes and sockets once I understand them. diff --git a/markdown-styles.css b/markdown-styles.css index 0fd441e..4befa3f 100644 --- a/markdown-styles.css +++ b/markdown-styles.css @@ -3,7 +3,7 @@ h1, h2, h3, h4, h5, h6, p { } h1 { - font-size: 18px; + font-size: 16px; } p, ul, li { @@ -12,4 +12,5 @@ p, ul, li { pre, code { font-family: 'LigaLiberationMono'; + font-size: 14px; } \ No newline at end of file